explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PMyd

Settings
# exclusive inclusive rows x rows loops node
1. 0.248 7,228.546 ↓ 0.0 0 1

Nested Loop (cost=0.69..4,460.23 rows=1 width=239) (actual time=7,228.546..7,228.546 rows=0 loops=1)

2. 1.998 1.998 ↑ 1.0 100 1

Index Only Scan using email_addresses_pkey on email_addresses (cost=0.69..539.70 rows=100 width=4) (actual time=0.008..1.998 rows=100 loops=1)

  • Index Cond: (id = ANY ('{10894848,10894851,10894853,10894865,10894872,10894875,10894882,10894885,10894900,10894903,10894904,10894909,10894913,10894935,10894936,10894940,10894947,10894950,10894952,10894960,10894973,10894985,10894988,10894999,10895002,10895021,10895026,10895047,10895048,10895051,10895060,10895070,10895074,10895075,10895079,10895081,10895082,10895093,10895103,10895113,10895116,10895119,10895124,10895130,10895133,10895136,10895138,10895147,10895149,10895150,10895151,10895154,10895155,10895157,10895160,10895171,10895179,10895182,10895186,10895188,10895192,10895210,10895215,10895220,10895224,10895234,10895253,10895272,10895283,10895285,10895303,10895304,10895306,10895307,10895308,10895312,10895313,108953218,10895333,10895335,10895343,10895347,10895362,10895364,10895365,10895373,10895375,10895378,10895393,10895401,10895407,10895408,10895409,10895414,10895415,10895428,10895429,10895432,10895433,10895439}'::integer[]))
  • Heap Fetches: 22
3. 1.500 7,226.300 ↓ 0.0 0 100

Append (cost=0.00..39.14 rows=7 width=186) (actual time=72.263..72.263 rows=0 loops=100)

4. 0.100 0.100 ↓ 0.0 0 100

Seq Scan on email_messages (cost=0.00..0.00 rows=1 width=175) (actual time=0.001..0.001 rows=0 loops=100)

  • Filter: ((id >= 2179731284::bigint) AND (campaign_id = 249825) AND (status = 0) AND (email_addresses.id = email_address_id))
5. 7,223.000 7,223.000 ↓ 0.0 0 100

Index Scan using email_messages_p2170000000_campaign_id_id_status_idx on email_messages_p2170000000 (cost=0.56..8.61 rows=1 width=186) (actual time=72.230..72.230 rows=0 loops=100)

  • Index Cond: ((campaign_id = 249825) AND (id >= 2179731284::bigint) AND (status = 0))
  • Filter: (email_addresses.id = email_address_id)
  • Rows Removed by Filter: 146553
6. 0.800 0.800 ↓ 0.0 0 100

Index Scan using email_messages_p2180000000_email_address_id_idx on email_messages_p2180000000 (cost=0.42..8.29 rows=1 width=239) (actual time=0.008..0.008 rows=0 loops=100)

  • Index Cond: (email_address_id = email_addresses.id)
  • Filter: ((id >= 2179731284::bigint) AND (campaign_id = 249825) AND (status = 0))
7. 0.100 0.300 ↓ 0.0 0 100

Bitmap Heap Scan on email_messages_p2190000000 (cost=0.20..5.56 rows=1 width=176) (actual time=0.003..0.003 rows=0 loops=100)

  • Recheck Cond: (email_address_id = email_addresses.id)
  • Filter: ((id >= 2179731284::bigint) AND (campaign_id = 249825) AND (status = 0))
8. 0.200 0.200 ↓ 0.0 0 100

Bitmap Index Scan on email_messages_p2190000000_email_address_id_idx (cost=0.00..0.20 rows=2 width=0) (actual time=0.002..0.002 rows=0 loops=100)

  • Index Cond: (email_address_id = email_addresses.id)
9. 0.000 0.200 ↓ 0.0 0 100

Bitmap Heap Scan on email_messages_p2200000000 (cost=0.20..5.56 rows=1 width=176) (actual time=0.002..0.002 rows=0 loops=100)

  • Recheck Cond: (email_address_id = email_addresses.id)
  • Filter: ((id >= 2179731284::bigint) AND (campaign_id = 249825) AND (status = 0))
10. 0.200 0.200 ↓ 0.0 0 100

Bitmap Index Scan on email_messages_p2200000000_email_address_id_idx (cost=0.00..0.20 rows=2 width=0) (actual time=0.002..0.002 rows=0 loops=100)

  • Index Cond: (email_address_id = email_addresses.id)
11. 0.000 0.200 ↓ 0.0 0 100

Bitmap Heap Scan on email_messages_p2210000000 (cost=0.20..5.56 rows=1 width=176) (actual time=0.002..0.002 rows=0 loops=100)

  • Recheck Cond: (email_address_id = email_addresses.id)
  • Filter: ((id >= 2179731284::bigint) AND (campaign_id = 249825) AND (status = 0))
12. 0.200 0.200 ↓ 0.0 0 100

Bitmap Index Scan on email_messages_p2210000000_email_address_id_idx (cost=0.00..0.20 rows=2 width=0) (actual time=0.002..0.002 rows=0 loops=100)

  • Index Cond: (email_address_id = email_addresses.id)
13. 0.000 0.200 ↓ 0.0 0 100

Bitmap Heap Scan on email_messages_p2220000000 (cost=0.20..5.56 rows=1 width=176) (actual time=0.002..0.002 rows=0 loops=100)

  • Recheck Cond: (email_address_id = email_addresses.id)
  • Filter: ((id >= 2179731284::bigint) AND (campaign_id = 249825) AND (status = 0))
14. 0.200 0.200 ↓ 0.0 0 100

Bitmap Index Scan on email_messages_p2220000000_email_address_id_idx (cost=0.00..0.20 rows=2 width=0) (actual time=0.002..0.002 rows=0 loops=100)

  • Index Cond: (email_address_id = email_addresses.id)
Planning time : 20.823 ms
Execution time : 7,228.641 ms