explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 24X

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 467.238 ↓ 0.0 0 1

Limit (cost=2,806,867.99..2,806,867.99 rows=1 width=366) (actual time=467.238..467.238 rows=0 loops=1)

2. 0.095 467.235 ↑ 1.0 28 1

Sort (cost=2,806,867.92..2,806,867.99 rows=28 width=366) (actual time=467.214..467.235 rows=28 loops=1)

  • Sort Key: p.title_sortable COLLATE vue
  • Sort Method: quicksort Memory: 125kB
3. 0.192 467.140 ↑ 1.0 28 1

WindowAgg (cost=2,797,139.19..2,806,867.25 rows=28 width=366) (actual time=467.081..467.140 rows=28 loops=1)

4. 0.005 466.948 ↑ 1.0 28 1

Append (cost=2,797,139.19..2,806,866.13 rows=28 width=344) (actual time=461.094..466.948 rows=28 loops=1)

5. 0.001 461.102 ↑ 1.0 14 1

Limit (cost=2,797,139.19..2,797,139.23 rows=14 width=1,590) (actual time=461.093..461.102 rows=14 loops=1)

6. 0.434 461.101 ↑ 12.6 14 1

Sort (cost=2,797,139.19..2,797,139.64 rows=177 width=1,590) (actual time=461.092..461.101 rows=14 loops=1)

  • Sort Key: p.title_sortable COLLATE vue
  • Sort Method: top-N heapsort Memory: 68kB
7. 0.171 460.667 ↑ 1.7 105 1

Nested Loop Left Join (cost=15,795.28..2,797,134.94 rows=177 width=1,590) (actual time=19.576..460.667 rows=105 loops=1)

8. 0.142 436.871 ↑ 1.7 105 1

Nested Loop (cost=15,376.61..2,723,025.06 rows=177 width=1,566) (actual time=18.303..436.871 rows=105 loops=1)

9. 0.205 0.963 ↑ 1.7 106 1

Nested Loop (cost=0.85..1,511.57 rows=177 width=12) (actual time=0.029..0.963 rows=106 loops=1)

10. 0.206 0.206 ↓ 1.0 184 1

Index Scan using sentv_user_favorite_series_pkey on sentv_user_favorite_series fs (cost=0.56..687.82 rows=177 width=12) (actual time=0.018..0.206 rows=184 loops=1)

  • Index Cond: (profile_id = 20212)
11. 0.552 0.552 ↑ 1.0 1 184

Index Only Scan using sentv_series_pkey on sentv_series s (cost=0.29..4.64 rows=1 width=4) (actual time=0.003..0.003 rows=1 loops=184)

  • Index Cond: (series_id = fs.series_id)
  • Heap Fetches: 41
12. 0.212 435.766 ↑ 1.0 1 106

Limit (cost=15,375.76..15,375.76 rows=1 width=1,586) (actual time=4.110..4.111 rows=1 loops=106)

13. 7.526 435.554 ↑ 33.0 1 106

Sort (cost=15,375.76..15,375.84 rows=33 width=1,586) (actual time=4.109..4.109 rows=1 loops=106)

  • Sort Key: (CASE WHEN (((array_agg(CASE WHEN (a.broadcast_date IS NULL) THEN a.calculated_broadcast_date ELSE a.broadcast_date END ORDER BY CASE WHEN (a.broadcast_date IS NULL) THEN a.calculated_broadcast_date ELSE a.broadcast_date END DESC, CASE WHEN (a.start_date <= now()) THEN a.start_date ELSE '-infinity'::timestamp without time zone END DESC, CASE WHEN (a.start_date > now()) THEN a.start_date ELSE 'infinity'::timestamp without time zone END, a.airing_id))[1]) < now()) THEN ((array_agg(CASE WHEN (a.broadcast_date IS NULL) THEN a.calculated_broadcast_date ELSE a.broadcast_date END ORDER BY CASE WHEN (a.broadcast_date IS NULL) THEN a.calculated_broadcast_date ELSE a.broadcast_date END DESC, CASE WHEN (a.start_date <= now()) THEN a.start_date ELSE '-infinity'::timestamp without time zone END DESC, CASE WHEN (a.start_date > now()) THEN a.start_date ELSE 'infinity'::timestamp without time zone END, a.airing_id))[1]) ELSE NULL::timestamp without time zone END) DESC NULLS LAST, (CASE WHEN (((array_agg(a.start_date ORDER BY CASE WHEN (a.broadcast_date IS NULL) THEN a.calculated_broadcast_date ELSE a.broadcast_date END DESC, CASE WHEN (a.start_date <= now()) THEN a.start_date ELSE '-infinity'::timestamp without time zone END DESC, CASE WHEN (a.start_date > now()) THEN a.start_date ELSE 'infinity'::timestamp without time zone END, a.airing_id))[1]) < now()) THEN ((array_agg(a.start_date ORDER BY CASE WHEN (a.broadcast_date IS NULL) THEN a.calculated_broadcast_date ELSE a.broadcast_date END DESC, CASE WHEN (a.start_date <= now()) THEN a.start_date ELSE '-infinity'::timestamp without time zone END DESC, CASE WHEN (a.start_date > now()) THEN a.start_date ELSE 'infinity'::timestamp without time zone END, a.airing_id))[1]) ELSE NULL::timestamp without time zone END) DESC NULLS LAST, (CASE WHEN (((array_agg(CASE WHEN (a.broadcast_date IS NULL) THEN a.calculated_broadcast_date ELSE a.broadcast_date END ORDER BY CASE WHEN (a.broadcast_date IS NULL) THEN a.calculated_broadcast_date ELSE a.broadcast_date END DESC, CASE WHEN (a.start_date <= now()) THEN a.start_date ELSE '-infinity'::timestamp without time zone END DESC, CASE WHEN (a.start_date > now()) THEN a.start_date ELSE 'infinity'::timestamp without time zone END, a.airing_id))[1]) >= now()) THEN ((array_agg(CASE WHEN (a.broadcast_date IS NULL) THEN a.calculated_broadcast_date ELSE a.broadcast_date END ORDER BY CASE WHEN (a.broadcast_date IS NULL) THEN a.calculated_broadcast_date ELSE a.broadcast_date END DESC, CASE WHEN (a.start_date <= now()) THEN a.start_date ELSE '-infinity'::timestamp without time zone END DESC, CASE WHEN (a.start_date > now()) THEN a.start_date ELSE 'infinity'::timestamp without time zone END, a.airing_id))[1]) ELSE NULL::timestamp without time zone END), (CASE WHEN (((array_agg(a.start_date ORDER BY CASE WHEN (a.broadcast_date IS NULL) THEN a.calculated_broadcast_date ELSE a.broadcast_date END DESC, CASE WHEN (a.start_date <= now()) THEN a.start_date ELSE '-infinity'::timestamp without time zone END DESC, CASE WHEN (a.start_date > now()) THEN a.start_date ELSE 'infinity'::timestamp without time zone END, a.airing_id))[1]) >= now()) THEN ((array_agg(a.start_date ORDER BY CASE WHEN (a.broadcast_date IS NULL) THEN a.calculated_broadcast_date ELSE a.broadcast_date END DESC, CASE WHEN (a.start_date <= now()) THEN a.start_date ELSE '-infinity'::timestamp without time zone END DESC, CASE WHEN (a.start_date > now()) THEN a.start_date ELSE 'infinity'::timestamp without time zone END, a.airing_id))[1]) ELSE NULL::timestamp without time zone END)
  • Sort Method: top-N heapsort Memory: 26kB
14. 7.134 428.028 ↓ 1.6 54 106

Nested Loop Left Join (cost=15,087.66..15,375.59 rows=33 width=1,586) (actual time=2.073..4.038 rows=54 loops=106)

15. 182.426 398.030 ↓ 1.6 54 106

GroupAggregate (cost=15,087.09..15,090.72 rows=33 width=1,532) (actual time=2.065..3.755 rows=54 loops=106)

  • Group Key: p.program_id
16. 27.242 215.604 ↓ 2.7 89 106

Sort (cost=15,087.09..15,087.17 rows=33 width=2,298) (actual time=1.980..2.034 rows=89 loops=106)

  • Sort Key: p.program_id
  • Sort Method: quicksort Memory: 92kB
17. 5.858 188.362 ↓ 2.7 89 106

Nested Loop Left Join (cost=6.22..15,086.26 rows=33 width=2,298) (actual time=0.034..1.777 rows=89 loops=106)

  • Join Filter: (p.series_id = s.series_id)
18. 9.858 11.024 ↓ 1.6 54 106

Bitmap Heap Scan on sentv_program p (cost=4.68..134.74 rows=33 width=1,384) (actual time=0.020..0.104 rows=54 loops=106)

  • Recheck Cond: (series_id = s.series_id)
  • Heap Blocks: exact=5902
19. 1.166 1.166 ↓ 1.8 58 106

Bitmap Index Scan on sentv_program_series_id_idx (cost=0.00..4.67 rows=33 width=0) (actual time=0.011..0.011 rows=58 loops=106)

  • Index Cond: (series_id = s.series_id)
20. 6.164 171.480 ↑ 1.0 1 5,716

Nested Loop Anti Join (cost=1.54..453.06 rows=1 width=922) (actual time=0.013..0.030 rows=1 loops=5,716)

21. 8.404 160.048 ↑ 1.0 1 5,716

Nested Loop (cost=1.27..446.19 rows=1 width=1,003) (actual time=0.012..0.028 rows=1 loops=5,716)

22. 6.125 120.036 ↑ 4.0 1 5,716

Nested Loop (cost=0.71..437.18 rows=4 width=1,014) (actual time=0.010..0.021 rows=1 loops=5,716)

23. 74.308 74.308 ↑ 22.0 2 5,716

Index Scan using sentv_airing_program_id_idx on sentv_airing a (cost=0.43..422.75 rows=44 width=1,018) (actual time=0.006..0.013 rows=2 loops=5,716)

  • Index Cond: (program_id = p.program_id)
  • Filter: ((start_date >= '2019-01-08 12:23:38.282'::timestamp without time zone) AND (dvr_expiration_date <> end_date) AND ((age_rating || '_RESTRICTED'::text) <> ALL ('{PSVUE_MEDIA_OPS}'::text[])) AND ((dvr_expiration_date > now()) OR (expiration_date > now()) OR (((vod_ready_date IS NULL) OR (vod_ready_date <= now())) AND (expiration_date >= now()))))
  • Rows Removed by Filter: 4
24. 39.603 39.603 ↓ 0.0 0 13,201

Index Scan using sentv_channel_channel_id_idx on sentv_channel c (cost=0.28..0.32 rows=1 width=4) (actual time=0.003..0.003 rows=0 loops=13,201)

  • Index Cond: (channel_id = a.channel_id)
  • Filter: ((('SUPER'::text = ANY ('{PSVUE_MEDIA_OPS}'::text[])) OR ('{PSVUE_MEDIA_OPS}'::text[] && ent_keywords)) AND (cardinality(region_dma_codes) > 0) AND (((channel_id)::text || '_RESTRICTED'::text) <> ALL ('{PSVUE_MEDIA_OPS}'::text[])))
  • Rows Removed by Filter: 1
25. 31.608 31.608 ↑ 1.0 1 5,268

Index Scan using sentv_user_favorite_series_pkey on sentv_user_favorite_series fs_1 (cost=0.56..2.22 rows=1 width=12) (actual time=0.005..0.006 rows=1 loops=5,268)

  • Index Cond: ((profile_id = 20212) AND (series_id = a.series_id))
  • Filter: ((favorite_date < a.end_date) AND (((favorite_date < a.end_date) AND (a.dvr_expiration_date > now())) OR (a.expiration_date > now()) OR (((a.vod_ready_date IS NULL) OR (a.vod_ready_date <= now())) AND (a.expiration_date >= now()))) AND (CASE WHEN (a.type = 'vod'::text) THEN 'vod'::text WHEN (now() < a.start_date) THEN 'coming_up'::text WHEN ((now() > a.start_date) AND (now() < a.end_date)) THEN 'live'::text WHEN ((now() < a.dvr_expiration_date) AND (favorite_date < a.end_date)) THEN 'dvr'::text WHEN ((CASE WHEN (a.type = 'vod'::text) THEN a.expiration_date WHEN ((now() < a.dvr_expiration_date) AND (favorite_date < a.end_date)) THEN a.dvr_expiration_date WHEN (a.fallback_startover_date IS NOT NULL) THEN a.fallback_startover_date ELSE a.expiration_date END IS NOT NULL) AND (now() < CASE WHEN (a.type = 'vod'::text) THEN a.expiration_date WHEN ((now() < a.dvr_expiration_date) AND (favorite_date < a.end_date)) THEN a.dvr_expiration_date WHEN (a.fallback_startover_date IS NOT NULL) THEN a.fallback_startover_date ELSE a.expiration_date END)) THEN 'catchup'::text WHEN a.vod_replacement_available THEN 'vod'::text ELSE 'no_longer_available'::text END <> 'vod'::text) AND (CASE WHEN (a.type = 'vod'::text) THEN 'vod'::text WHEN (now() < a.start_date) THEN 'coming_up'::text WHEN ((now() > a.start_date) AND (now() < a.end_date)) THEN 'live'::text WHEN ((now() < a.dvr_expiration_date) AND (favorite_date < a.end_date)) THEN 'dvr'::text WHEN ((CASE WHEN (a.type = 'vod'::text) THEN a.expiration_date WHEN ((now() < a.dvr_expiration_date) AND (favorite_date < a.end_date)) THEN a.dvr_expiration_date WHEN (a.fallback_startover_date IS NOT NULL) THEN a.fallback_startover_date ELSE a.expiration_date END IS NOT NULL) AND (now() < CASE WHEN (a.type = 'vod'::text) THEN a.expiration_date WHEN ((now() < a.dvr_expiration_date) AND (favorite_date < a.end_date)) THEN a.dvr_expiration_date WHEN (a.fallback_startover_date IS NOT NULL) THEN a.fallback_startover_date ELSE a.expiration_date END)) THEN 'catchup'::text WHEN a.vod_replacement_available THEN 'vod'::text ELSE 'no_longer_available'::text END <> 'no_longer_available'::text))
26. 5.268 5.268 ↓ 0.0 0 5,268

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.001..0.001 rows=0 loops=5,268)

  • Index Cond: ((rule_name)::text = ANY (a.bo_rules))
  • Filter: CASE WHEN (('ALL'::text = ANY (dmas)) OR ('10011'::text = ANY (zipcodes)) OR ('firetv'::text = ANY (device_types)) OR ((cardinality(media_blackouts) > 0) AND (('ALL_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
  • Rows Removed by Filter: 0
27. 22.864 22.864 ↓ 0.0 0 5,716

Index Scan using sentv_user_program_watch_history_pkey on sentv_user_program_watch_history whp (cost=0.57..8.59 rows=1 width=26) (actual time=0.004..0.004 rows=0 loops=5,716)

  • Index Cond: ((profile_id = 20212) AND (program_id = p.program_id))
28. 0.840 23.625 ↑ 1.0 1 105

Aggregate (cost=418.67..418.68 rows=1 width=8) (actual time=0.225..0.225 rows=1 loops=105)

29. 3.583 22.785 ↓ 3.1 52 105

Nested Loop Left Join (cost=5.25..418.63 rows=17 width=0) (actual time=0.027..0.217 rows=52 loops=105)

  • Filter: ((pwh.fully_watched IS NULL) OR (pwh.fully_watched IS FALSE))
  • Rows Removed by Filter: 3
30. 6.510 7.770 ↓ 1.6 54 105

Bitmap Heap Scan on sentv_program p_1 (cost=4.68..134.74 rows=33 width=4) (actual time=0.021..0.074 rows=54 loops=105)

  • Recheck Cond: (series_id = s.series_id)
  • Heap Blocks: exact=5902
31. 1.260 1.260 ↓ 1.8 58 105

Bitmap Index Scan on sentv_program_series_id_idx (cost=0.00..4.67 rows=33 width=0) (actual time=0.012..0.012 rows=58 loops=105)

  • Index Cond: (series_id = s.series_id)
32. 11.432 11.432 ↓ 0.0 0 5,716

Index Scan using sentv_user_program_watch_history_pkey on sentv_user_program_watch_history pwh (cost=0.57..8.59 rows=1 width=5) (actual time=0.002..0.002 rows=0 loops=5,716)

  • Index Cond: ((profile_id = 20212) AND (p_1.program_id = program_id))
33. 0.020 5.841 ↑ 1.0 14 1

Subquery Scan on *SELECT* 2 (cost=9,726.55..9,726.76 rows=14 width=1,590) (actual time=5.814..5.841 rows=14 loops=1)

34. 0.004 5.821 ↑ 1.0 14 1

Limit (cost=9,726.55..9,726.58 rows=14 width=1,586) (actual time=5.811..5.821 rows=14 loops=1)

35. 0.179 5.817 ↑ 11.9 14 1

Sort (cost=9,726.55..9,726.97 rows=167 width=1,586) (actual time=5.809..5.817 rows=14 loops=1)

  • Sort Key: p_2.title_sortable COLLATE vue
  • Sort Method: top-N heapsort Memory: 81kB
36. 0.061 5.638 ↑ 3.7 45 1

Nested Loop Left Join (cost=8,266.03..9,722.53 rows=167 width=1,586) (actual time=3.667..5.638 rows=45 loops=1)

37. 1.848 5.397 ↑ 3.7 45 1

GroupAggregate (cost=8,265.46..8,284.25 rows=167 width=1,540) (actual time=3.631..5.397 rows=45 loops=1)

  • Group Key: p_2.program_id, fp.favorite_date
38. 0.253 3.549 ↑ 1.9 89 1

Sort (cost=8,265.46..8,265.88 rows=167 width=2,306) (actual time=3.494..3.549 rows=89 loops=1)

  • Sort Key: p_2.program_id, fp.favorite_date
  • Sort Method: quicksort Memory: 256kB
39. 0.068 3.296 ↑ 1.9 89 1

Nested Loop Left Join (cost=2.27..8,259.29 rows=167 width=2,306) (actual time=0.086..3.296 rows=89 loops=1)

40. 0.092 0.483 ↑ 3.7 45 1

Nested Loop (cost=0.86..2,012.94 rows=167 width=1,388) (actual time=0.017..0.483 rows=45 loops=1)

41. 0.061 0.061 ↑ 1.5 110 1

Index Scan using sentv_user_favorite_program_pkey on sentv_user_favorite_program fp (cost=0.44..642.21 rows=167 width=12) (actual time=0.009..0.061 rows=110 loops=1)

  • Index Cond: (profile_id = 20212)
42. 0.330 0.330 ↓ 0.0 0 110

Index Scan using sentv_program_pkey on sentv_program p_2 (cost=0.42..8.20 rows=1 width=1,380) (actual time=0.003..0.003 rows=0 loops=110)

  • Index Cond: (program_id = fp.program_id)
43. 0.045 2.745 ↑ 1.0 1 45

Nested Loop Anti Join (cost=1.42..37.39 rows=1 width=922) (actual time=0.019..0.061 rows=1 loops=45)

44. 0.258 2.700 ↑ 1.0 1 45

Nested Loop (cost=1.14..30.52 rows=1 width=1,003) (actual time=0.018..0.060 rows=1 loops=45)

45. 0.139 2.070 ↑ 4.0 1 45

Nested Loop (cost=0.71..24.31 rows=4 width=1,010) (actual time=0.013..0.046 rows=1 loops=45)

46. 1.395 1.395 ↑ 14.7 3 45

Index Scan using sentv_airing_program_id_idx on sentv_airing a_1 (cost=0.43..9.88 rows=44 width=1,014) (actual time=0.008..0.031 rows=3 loops=45)

  • Index Cond: (program_id = p_2.program_id)
  • Filter: ((start_date >= '2019-01-08 12:23:38.282'::timestamp without time zone) AND (dvr_expiration_date <> end_date) AND ((age_rating || '_RESTRICTED'::text) <> ALL ('{PSVUE_MEDIA_OPS}'::text[])) AND ((dvr_expiration_date > now()) OR (expiration_date > now()) OR (((vod_ready_date IS NULL) OR (vod_ready_date <= now())) AND (expiration_date >= now()))))
  • Rows Removed by Filter: 13
47. 0.536 0.536 ↓ 0.0 0 134

Index Scan using sentv_channel_channel_id_idx on sentv_channel c_1 (cost=0.28..0.32 rows=1 width=4) (actual time=0.004..0.004 rows=0 loops=134)

  • Index Cond: (channel_id = a_1.channel_id)
  • Filter: ((('SUPER'::text = ANY ('{PSVUE_MEDIA_OPS}'::text[])) OR ('{PSVUE_MEDIA_OPS}'::text[] && ent_keywords)) AND (cardinality(region_dma_codes) > 0) AND (((channel_id)::text || '_RESTRICTED'::text) <> ALL ('{PSVUE_MEDIA_OPS}'::text[])))
  • Rows Removed by Filter: 1
48. 0.372 0.372 ↑ 1.0 1 62

Index Scan using sentv_user_favorite_program_pkey on sentv_user_favorite_program fp_1 (cost=0.44..1.53 rows=1 width=12) (actual time=0.006..0.006 rows=1 loops=62)

  • Index Cond: ((profile_id = 20212) AND (program_id = a_1.program_id))
  • Filter: ((favorite_date < a_1.end_date) AND (((favorite_date < a_1.end_date) AND (a_1.dvr_expiration_date > now())) OR (a_1.expiration_date > now()) OR (((a_1.vod_ready_date IS NULL) OR (a_1.vod_ready_date <= now())) AND (a_1.expiration_date >= now()))) AND (CASE WHEN (a_1.type = 'vod'::text) THEN 'vod'::text WHEN (now() < a_1.start_date) THEN 'coming_up'::text WHEN ((now() > a_1.start_date) AND (now() < a_1.end_date)) THEN 'live'::text WHEN ((now() < a_1.dvr_expiration_date) AND (favorite_date < a_1.end_date)) THEN 'dvr'::text WHEN ((CASE WHEN (a_1.type = 'vod'::text) THEN a_1.expiration_date WHEN ((now() < a_1.dvr_expiration_date) AND (favorite_date < a_1.end_date)) THEN a_1.dvr_expiration_date WHEN (a_1.fallback_startover_date IS NOT NULL) THEN a_1.fallback_startover_date ELSE a_1.expiration_date END IS NOT NULL) AND (now() < CASE WHEN (a_1.type = 'vod'::text) THEN a_1.expiration_date WHEN ((now() < a_1.dvr_expiration_date) AND (favorite_date < a_1.end_date)) THEN a_1.dvr_expiration_date WHEN (a_1.fallback_startover_date IS NOT NULL) THEN a_1.fallback_startover_date ELSE a_1.expiration_date END)) THEN 'catchup'::text WHEN a_1.vod_replacement_available THEN 'vod'::text ELSE 'no_longer_available'::text END <> 'vod'::text) AND (CASE WHEN (a_1.type = 'vod'::text) THEN 'vod'::text WHEN (now() < a_1.start_date) THEN 'coming_up'::text WHEN ((now() > a_1.start_date) AND (now() < a_1.end_date)) THEN 'live'::text WHEN ((now() < a_1.dvr_expiration_date) AND (favorite_date < a_1.end_date)) THEN 'dvr'::text WHEN ((CASE WHEN (a_1.type = 'vod'::text) THEN a_1.expiration_date WHEN ((now() < a_1.dvr_expiration_date) AND (favorite_date < a_1.end_date)) THEN a_1.dvr_expiration_date WHEN (a_1.fallback_startover_date IS NOT NULL) THEN a_1.fallback_startover_date ELSE a_1.expiration_date END IS NOT NULL) AND (now() < CASE WHEN (a_1.type = 'vod'::text) THEN a_1.expiration_date WHEN ((now() < a_1.dvr_expiration_date) AND (favorite_date < a_1.end_date)) THEN a_1.dvr_expiration_date WHEN (a_1.fallback_startover_date IS NOT NULL) THEN a_1.fallback_startover_date ELSE a_1.expiration_date END)) THEN 'catchup'::text WHEN a_1.vod_replacement_available THEN 'vod'::text ELSE 'no_longer_available'::text END <> 'no_longer_available'::text))
49. 0.000 0.000 ↓ 0.0 0 62

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

  • Index Cond: ((rule_name)::text = ANY (a_1.bo_rules))
  • Filter: CASE WHEN (('ALL'::text = ANY (dmas)) OR ('10011'::text = ANY (zipcodes)) OR ('firetv'::text = ANY (device_types)) OR ((cardinality(media_blackouts) > 0) AND (('ALL_BLACKOUT'::text = ANY (a_1.bo_keywords)) OR (a_1.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
50. 0.180 0.180 ↓ 0.0 0 45

Index Scan using sentv_user_program_watch_history_pkey on sentv_user_program_watch_history whp_1 (cost=0.57..8.59 rows=1 width=26) (actual time=0.004..0.004 rows=0 loops=45)

  • Index Cond: ((profile_id = 20212) AND (program_id = p_2.program_id))