explain.depesz.com

PostgreSQL's explain analyze made readable

Result: p5se

Settings
# exclusive inclusive rows x rows loops node
1. 25,686.311 29,352.530 ↓ 0.0 0 1

Update on subscribers (cost=97,842.65..306,025.80 rows=24,930 width=1,269) (actual time=29,352.530..29,352.530 rows=0 loops=1)

2. 61.136 3,666.219 ↑ 1.1 23,133 1

Nested Loop (cost=97,842.65..306,025.80 rows=24,930 width=1,269) (actual time=244.296..3,666.219 rows=23,133 loops=1)

3. 29.870 319.629 ↑ 1.1 23,137 1

Subquery Scan on events (cost=97,842.08..98,278.40 rows=24,930 width=48) (actual time=239.937..319.629 rows=23,137 loops=1)

4. 27.975 289.759 ↑ 1.1 23,137 1

Unique (cost=97,842.08..98,029.10 rows=24,930 width=12) (actual time=239.924..289.759 rows=23,137 loops=1)

5. 31.493 261.784 ↑ 1.1 23,469 1

Sort (cost=97,842.08..97,904.42 rows=24,935 width=12) (actual time=239.921..261.784 rows=23,469 loops=1)

  • Sort Key: mailgun_events.subscriber_id, mailgun_events.occurred_at DESC
  • Sort Method: quicksort Memory: 1,869kB
6. 226.706 230.291 ↑ 1.1 23,469 1

Bitmap Heap Scan on mailgun_events (cost=581.81..96,021.10 rows=24,935 width=12) (actual time=6.178..230.291 rows=23,469 loops=1)

  • Recheck Cond: ((store_id = 7,517) AND ((event)::text = 'opened'::text))
  • Heap Blocks: exact=15,069
7. 3.585 3.585 ↑ 1.1 23,469 1

Bitmap Index Scan on mg_partial_opened (cost=0.00..575.58 rows=24,935 width=0) (actual time=3.585..3.585 rows=23,469 loops=1)

  • Index Cond: (store_id = 7,517)
8. 3,285.454 3,285.454 ↑ 1.0 1 23,137

Index Scan using subscribers_pkey on subscribers (cost=0.56..8.33 rows=1 width=1,225) (actual time=0.142..0.142 rows=1 loops=23,137)

  • Index Cond: (id = events.subscriber_id)
Planning time : 9.093 ms
Execution time : 29,352.772 ms