explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RAcn : new_events without joins

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 34.129 154.587 ↓ 1.2 68,407 1

Sort (cost=34,856.03..35,002.74 rows=58,685 width=77) (actual time=149.742..154.587 rows=68,407 loops=1)

  • Sort Key: e.id
  • Sort Method: quicksort Memory: 12546kB
2. 8.906 120.458 ↓ 1.2 68,407 1

Result (cost=0.00..30,207.97 rows=58,685 width=77) (actual time=0.290..120.458 rows=68,407 loops=1)

3. 4.581 111.552 ↓ 1.2 68,407 1

Append (cost=0.00..29,621.12 rows=58,685 width=76) (actual time=0.290..111.552 rows=68,407 loops=1)

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 03:59:09.008368'::timestamp without time zone) AND (confirmation_state = 'pending'::enum_confirmation_state))
5. 75.936 75.936 ↓ 1.2 51,032 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.288..75.936 rows=51,032 loops=1)

  • Filter: (event_time_utc > '2019-01-31 03:59:09.008368'::timestamp without time zone)
6. 0.025 3.528 ↑ 92.1 8 1

Bitmap Heap Scan on event_2019m01 e_2 (cost=1,058.48..3,823.56 rows=737 width=76) (actual time=3.518..3.528 rows=8 loops=1)

  • Recheck Cond: ((event_time_utc > '2019-01-31 03:59:09.008368'::timestamp without time zone) AND (NOT acknowledged) AND (confirmation_state = 'pending'::enum_confirmation_state))
  • Heap Blocks: exact=7
7. 0.729 3.503 ↓ 0.0 0 1

BitmapAnd (cost=1,058.48..1,058.48 rows=737 width=0) (actual time=3.503..3.503 rows=0 loops=1)

8. 2.610 2.610 ↓ 1.2 22,483 1

Bitmap Index Scan on i_event_2019m01_ts (cost=0.00..369.57 rows=18,820 width=0) (actual time=2.610..2.610 rows=22,483 loops=1)

  • Index Cond: (event_time_utc > '2019-01-31 03:59:09.008368'::timestamp without time zone)
9. 0.164 0.164 ↑ 61.9 500 1

Bitmap Index Scan on i_event_2019m01_unread (cost=0.00..688.29 rows=30,933 width=0) (actual time=0.164..0.164 rows=500 loops=1)

10. 27.506 27.506 ↓ 1.2 17,367 1

Index Scan using i_event_2019m03_unread on event_2019m03 e_3 (cost=0.29..4,331.71 rows=14,989 width=76) (actual time=0.010..27.506 rows=17,367 loops=1)

  • Filter: (event_time_utc > '2019-01-31 03:59:09.008368'::timestamp without time zone)