explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 85qE

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 52.842 1,678.795 ↓ 1.2 68,126 1

Nested Loop Left Join (cost=1.03..4,602,178.18 rows=58,224 width=85) (actual time=0.407..1,678.795 rows=68,126 loops=1)

2. 9.124 127.181 ↓ 1.2 68,126 1

Merge Append (cost=1.03..40,974.46 rows=58,224 width=76) (actual time=0.395..127.181 rows=68,126 loops=1)

  • Sort Key: e.id
3. 0.004 0.005 ↓ 0.0 0 1

Sort (cost=0.01..0.02 rows=1 width=76) (actual time=0.005..0.005 rows=0 loops=1)

  • Sort Key: e.id
  • Sort Method: quicksort Memory: 25kB
4. 0.001 0.001 ↓ 0.0 0 1

Seq Scan on event e (cost=0.00..0.00 rows=1 width=76) (actual time=0.001..0.001 rows=0 loops=1)

  • Filter: ((NOT acknowledged) AND (event_time_utc > '2019-01-31 02:26:23.199175'::timestamp without time zone) AND (confirmation_state = 'pending'::enum_confirmation_state))
5. 87.609 87.609 ↓ 1.2 51,196 1

Index Scan using i_event_2019m02_unread on event_2019m02 e_1 (cost=0.41..21,465.85 rows=42,958 width=76) (actual time=0.281..87.609 rows=51,196 loops=1)

  • Filter: (event_time_utc > '2019-01-31 02:26:23.199175'::timestamp without time zone)
6. 0.519 0.519 ↑ 79.2 10 1

Index Scan using i_event_2019m01_unread on event_2019m01 e_2 (cost=0.28..14,048.20 rows=792 width=76) (actual time=0.101..0.519 rows=10 loops=1)

  • Filter: (event_time_utc > '2019-01-31 02:26:23.199175'::timestamp without time zone)
  • Rows Removed by Filter: 495
7. 29.924 29.924 ↓ 1.2 16,920 1

Index Scan using i_event_2019m03_unread on event_2019m03 e_3 (cost=0.29..4,150.31 rows=14,473 width=76) (actual time=0.006..29.924 rows=16,920 loops=1)

  • Filter: (event_time_utc > '2019-01-31 02:26:23.199175'::timestamp without time zone)
8. 408.756 1,498.772 ↑ 15.0 1 68,126

Append (cost=0.00..78.19 rows=15 width=16) (actual time=0.014..0.022 rows=1 loops=68,126)

9. 0.000 0.000 ↓ 0.0 0 68,126

Seq Scan on shift_record sr (cost=0.00..0.00 rows=1 width=16) (actual time=0.000..0.000 rows=0 loops=68,126)

  • Filter: (event_id = e.id)
10. 136.252 136.252 ↓ 0.0 0 68,126

Index Scan using pk_shift_record_2019m02 on shift_record_2019m02 sr_1 (cost=0.43..6.26 rows=1 width=16) (actual time=0.002..0.002 rows=0 loops=68,126)

  • Index Cond: (event_id = e.id)
11. 68.126 68.126 ↓ 0.0 0 68,126

Index Scan using pk_shift_record_2018m12 on shift_record_2018m12 sr_2 (cost=0.43..6.28 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=68,126)

  • Index Cond: (event_id = e.id)
12. 68.126 68.126 ↓ 0.0 0 68,126

Index Scan using pk_shift_record_2018m02 on shift_record_2018m02 sr_3 (cost=0.43..4.95 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=68,126)

  • Index Cond: (event_id = e.id)
13. 68.126 68.126 ↓ 0.0 0 68,126

Index Scan using pk_shift_record_2019m01 on shift_record_2019m01 sr_4 (cost=0.43..6.33 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=68,126)

  • Index Cond: (event_id = e.id)
14. 68.126 68.126 ↓ 0.0 0 68,126

Index Scan using pk_shift_record_2018m03 on shift_record_2018m03 sr_5 (cost=0.43..4.78 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=68,126)

  • Index Cond: (event_id = e.id)
15. 68.126 68.126 ↓ 0.0 0 68,126

Index Scan using pk_shift_record_2018m08 on shift_record_2018m08 sr_6 (cost=0.43..5.71 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=68,126)

  • Index Cond: (event_id = e.id)
16. 68.126 68.126 ↓ 0.0 0 68,126

Index Scan using pk_shift_record_2018m04 on shift_record_2018m04 sr_7 (cost=0.43..4.84 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=68,126)

  • Index Cond: (event_id = e.id)
17. 68.126 68.126 ↓ 0.0 0 68,126

Index Scan using pk_shift_record_2018m11 on shift_record_2018m11 sr_8 (cost=0.43..6.28 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=68,126)

  • Index Cond: (event_id = e.id)
18. 68.126 68.126 ↓ 0.0 0 68,126

Index Scan using pk_shift_record_2018m05 on shift_record_2018m05 sr_9 (cost=0.43..5.09 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=68,126)

  • Index Cond: (event_id = e.id)
19. 68.126 68.126 ↓ 0.0 0 68,126

Index Scan using pk_shift_record_2018m10 on shift_record_2018m10 sr_10 (cost=0.43..6.25 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=68,126)

  • Index Cond: (event_id = e.id)
20. 68.126 68.126 ↓ 0.0 0 68,126

Index Scan using pk_shift_record_2018m06 on shift_record_2018m06 sr_11 (cost=0.43..5.33 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=68,126)

  • Index Cond: (event_id = e.id)
21. 68.126 68.126 ↓ 0.0 0 68,126

Index Scan using pk_shift_record_2018m07 on shift_record_2018m07 sr_12 (cost=0.43..5.57 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=68,126)

  • Index Cond: (event_id = e.id)
22. 68.126 68.126 ↓ 0.0 0 68,126

Index Scan using pk_shift_record_2018m09 on shift_record_2018m09 sr_13 (cost=0.43..5.73 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=68,126)

  • Index Cond: (event_id = e.id)
23. 136.252 136.252 ↓ 0.0 0 68,126

Index Scan using pk_shift_record_2019m03 on shift_record_2019m03 sr_14 (cost=0.43..4.77 rows=1 width=16) (actual time=0.002..0.002 rows=0 loops=68,126)

  • Index Cond: (event_id = e.id)
Planning time : 8.497 ms
Execution time : 1,683.529 ms