explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bF82

Settings
# exclusive inclusive rows x rows loops node
1. 0.194 224.019 ↓ 1.6 592 1

Nested Loop Anti Join (cost=6,313.54..413,004.21 rows=366 width=2,319) (actual time=9.888..224.019 rows=592 loops=1)

2. 13.708 223.825 ↑ 1.2 592 1

Hash Join (cost=6,313.26..411,361.14 rows=732 width=2,299) (actual time=9.885..223.825 rows=592 loops=1)

  • Hash Cond: (a.program_id = p.program_id)
3. 13.878 207.083 ↓ 1.8 152,192 1

Nested Loop (cost=87.85..404,804.35 rows=86,414 width=941) (actual time=0.325..207.083 rows=152,192 loops=1)

4. 21.253 21.253 ↓ 2.7 176 1

Index Scan using sentv_channel_channel_id_idx on sentv_channel c (cost=0.28..5,287.58 rows=65 width=4) (actual time=0.021..21.253 rows=176 loops=1)

  • Filter: ((cardinality(region_dma_codes) > 0) AND (('SUPER'::text = ANY ('{SUPER,EXTENDED,PREMIUM,ULTRA,BASIC}'::text[])) OR ('{SUPER,EXTENDED,PREMIUM,ULTRA,BASIC}'::text[] && ent_keywords)) AND (((channel_id)::text || '_RESTRICTED'::text) <> ALL ('{SUPER,EXTENDED,PREMIUM,ULTRA,BASIC}'::text[])) AND (('NAT'::text = ANY (region_dma_codes)) OR ('NAT-EA'::text = ANY (region_dma_codes)) OR (('501'::text = ANY (region_dma_codes)) AND (('501'::text <> ALL (sub_dmas)) OR ('10543'::text = ANY (sub_dma_zips)) OR (sub_dmas = '{}'::text[]) OR (sub_dma_zips = '{}'::text[])))))
  • Rows Removed by Filter: 956
5. 150.128 171.952 ↑ 1.6 865 176

Bitmap Heap Scan on sentv_airing a (cost=87.57..6,133.00 rows=1,341 width=945) (actual time=0.174..0.977 rows=865 loops=176)

  • Recheck Cond: (channel_id = c.channel_id)
  • Filter: (((age_rating || '_RESTRICTED'::text) <> ALL ('{SUPER,EXTENDED,PREMIUM,ULTRA,BASIC}'::text[])) AND ((type <> 'vod'::text) OR (((vod_ready_date IS NULL) OR (vod_ready_date <= now())) AND (expiration_date >= now()))))
  • Rows Removed by Filter: 5
  • Heap Blocks: exact=79298
6. 21.824 21.824 ↑ 1.8 941 176

Bitmap Index Scan on idx_sentv_airing_complex2 (cost=0.00..87.23 rows=1,703 width=0) (actual time=0.124..0.124 rows=941 loops=176)

  • Index Cond: (channel_id = c.channel_id)
7. 0.955 3.034 ↑ 1.1 1,663 1

Hash (cost=6,203.20..6,203.20 rows=1,777 width=1,362) (actual time=3.034..3.034 rows=1,663 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 1176kB
8. 1.865 2.079 ↑ 1.1 1,663 1

Bitmap Heap Scan on sentv_program p (cost=118.19..6,203.20 rows=1,777 width=1,362) (actual time=0.386..2.079 rows=1,663 loops=1)

  • Recheck Cond: (series_id = 70978)
  • Heap Blocks: exact=1489
9. 0.214 0.214 ↑ 1.1 1,667 1

Bitmap Index Scan on sentv_program_series_id_idx (cost=0.00..117.75 rows=1,777 width=0) (actual time=0.214..0.214 rows=1,667 loops=1)

  • Index Cond: (series_id = 70978)
10. 0.000 0.000 ↓ 0.0 0 592

Index Scan using sentv_blackout_rule_pkey on sentv_blackout_rule b (cost=0.28..3.55 rows=5 width=1,425) (actual time=0.000..0.000 rows=0 loops=592)

  • Index Cond: ((rule_name)::text = ANY (a.bo_rules))
  • Filter: CASE WHEN (('501'::text = ANY (dmas)) OR ('10543'::text = ANY (zipcodes)) OR ('ps4'::text = ANY (device_types)) OR ((cardinality(media_blackouts) > 0) AND (('501_BLACKOUT'::text = ANY (a.bo_keywords)) OR (a.bo_keywords && media_blackouts)))) THEN CASE WHEN (rule_type = 1) THEN true ELSE false END ELSE CASE WHEN (rule_type = 2) THEN true ELSE false END END