explain.depesz.com

PostgreSQL's explain analyze made readable

Result: eknq

Settings
# exclusive inclusive rows x rows loops node
1. 0.024 276.483 ↓ 1.2 17 1

Unique (cost=48,522.31..48,522.38 rows=14 width=19) (actual time=276.447..276.483 rows=17 loops=1)

2. 0.195 276.459 ↓ 10.9 152 1

Sort (cost=48,522.31..48,522.35 rows=14 width=19) (actual time=276.446..276.459 rows=152 loops=1)

  • Sort Key: p.title
  • Sort Method: quicksort Memory: 35kB
3. 10.957 276.264 ↓ 10.9 152 1

Nested Loop (cost=0.98..48,522.05 rows=14 width=19) (actual time=12.919..276.264 rows=152 loops=1)

4. 2.351 89.547 ↓ 1.0 10,985 1

Nested Loop (cost=0.56..13,106.81 rows=10,946 width=4) (actual time=0.421..89.547 rows=10,985 loops=1)

5. 5.436 5.436 ↓ 1.9 112 1

Seq Scan on sentv_channel c (cost=0.00..661.27 rows=60 width=4) (actual time=0.049..5.436 rows=112 loops=1)

  • Filter: ((cardinality(region_dma_codes) > 0) AND (('SUPER'::text = ANY ('{MACHINIMA,EXTENDED,EPIX,PREMIUM,HIYAH,BASIC}'::text[])) OR ('{MACHINIMA,EXTENDED,EPIX,PREMIUM,HIYAH,BASIC}'::text[] && ent_keywords)) AND (((channel_id)::text || '_RESTRICTED'::text) <> ALL ('{MACHINIMA,EXTENDED,EPIX,PREMIUM,HIYAH,BASIC}'::text[])) AND (('NAT'::text = ANY (region_dma_codes)) OR ('NAT-WE'::text = ANY (region_dma_codes)) OR (('807'::text = ANY (region_dma_codes)) AND (('807'::text <> ALL (sub_dmas)) OR ('94117'::text = ANY (sub_dma_zips)) OR (sub_dmas = '{}'::text[]) OR (sub_dma_zips = '{}'::text[])))))
  • Rows Removed by Filter: 1044
6. 81.760 81.760 ↑ 1.9 98 112

Index Only Scan using idx_sentv_airing_complex1 on sentv_airing a (cost=0.56..205.59 rows=184 width=8) (actual time=0.185..0.730 rows=98 loops=112)

  • Index Cond: ((channel_id = c.channel_id) AND (expiration_date >= now()))
  • Filter: (((age_rating || '_RESTRICTED'::text) <> ALL ('{MACHINIMA,EXTENDED,EPIX,PREMIUM,HIYAH,BASIC}'::text[])) AND ((type <> 'vod'::text) OR (((vod_ready_date IS NULL) OR (vod_ready_date <= now())) AND (expiration_date >= now()))))
  • Heap Fetches: 1113
7. 175.760 175.760 ↓ 0.0 0 10,985

Index Scan using sentv_program_pkey on sentv_program p (cost=0.42..3.23 rows=1 width=23) (actual time=0.016..0.016 rows=0 loops=10,985)

  • Index Cond: (program_id = a.program_id)
  • Filter: (title ~* 'World'::text)
  • Rows Removed by Filter: 1