explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RYIl

Settings
# exclusive inclusive rows x rows loops node
1. 0.201 225.495 ↓ 1.5 592 1

Nested Loop Anti Join (cost=5,895.06..467,172.18 rows=386 width=2,322) (actual time=9.871..225.495 rows=592 loops=1)

2. 14.180 225.294 ↑ 1.3 592 1

Hash Join (cost=5,894.79..465,439.49 rows=772 width=2,304) (actual time=9.870..225.294 rows=592 loops=1)

  • Hash Cond: (a.program_id = p.program_id)
3. 14.037 208.132 ↓ 1.5 152,178 1

Nested Loop (cost=89.89..459,252.51 rows=99,828 width=943) (actual time=0.334..208.132 rows=152,178 loops=1)

4. 20.911 20.911 ↓ 2.7 176 1

Index Scan using sentv_channel_channel_id_idx on sentv_channel c (cost=0.28..5,352.89 rows=65 width=4) (actual time=0.024..20.911 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. 151.008 173.184 ↑ 1.8 865 176

Bitmap Heap Scan on sentv_airing a (cost=89.61..6,967.60 rows=1,547 width=947) (actual time=0.176..0.984 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=79170
6. 22.176 22.176 ↑ 2.1 940 176

Bitmap Index Scan on idx_sentv_airing_complex2 (cost=0.00..89.22 rows=1,968 width=0) (actual time=0.126..0.126 rows=940 loops=176)

  • Index Cond: (channel_id = c.channel_id)
7. 0.948 2.982 ↓ 1.0 1,663 1

Hash (cost=5,784.33..5,784.33 rows=1,646 width=1,365) (actual time=2.982..2.982 rows=1,663 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 1176kB
8. 1.804 2.034 ↓ 1.0 1,663 1

Bitmap Heap Scan on sentv_program p (cost=109.18..5,784.33 rows=1,646 width=1,365) (actual time=0.402..2.034 rows=1,663 loops=1)

  • Recheck Cond: (series_id = 70978)
  • Heap Blocks: exact=1489
9. 0.230 0.230 ↓ 1.0 1,667 1

Bitmap Index Scan on sentv_program_series_id_idx (cost=0.00..108.77 rows=1,646 width=0) (actual time=0.230..0.230 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