explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Wd86

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 0.021 ↓ 0.0 0 1

Limit (cost=31,628.08..31,628.30 rows=4 width=1,578) (actual time=0.021..0.021 rows=0 loops=1)

2. 0.002 0.020 ↓ 0.0 0 1

WindowAgg (cost=31,628.08..31,628.30 rows=4 width=1,578) (actual time=0.020..0.020 rows=0 loops=1)

3. 0.000 0.018 ↓ 0.0 0 1

Merge Append (cost=31,628.08..31,628.18 rows=4 width=1,556) (actual time=0.018..0.018 rows=0 loops=1)

  • Sort Key: p.prod_type
4. 0.002 0.006 ↓ 0.0 0 1

Sort (cost=31,516.91..31,516.91 rows=3 width=1,556) (actual time=0.006..0.006 rows=0 loops=1)

  • Sort Key: p.prod_type
  • Sort Method: quicksort Memory: 25kB
5. 0.001 0.004 ↓ 0.0 0 1

Nested Loop (cost=10,511.86..31,516.88 rows=3 width=1,556) (actual time=0.004..0.004 rows=0 loops=1)

6. 0.000 0.003 ↓ 0.0 0 1

Hash Join (cost=14.88..25.87 rows=3 width=13) (actual time=0.003..0.003 rows=0 loops=1)

  • Hash Cond: (s.series_id = fs.series_id)
7. 0.004 0.004 ↓ 0.0 0 1

Seq Scan on sentv_series s (cost=0.00..10.70 rows=70 width=5) (actual time=0.003..0.004 rows=0 loops=1)

8. 0.000 0.000 ↓ 0.0 0

Hash (cost=14.76..14.76 rows=9 width=12) (never executed)

9. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on sentv_user_favorite_series fs (cost=4.22..14.76 rows=9 width=12) (never executed)

  • Recheck Cond: (profile_id = 1387)
10. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on sentv_user_favorite_series_pkey (cost=0.00..4.22 rows=9 width=0) (never executed)

  • Index Cond: (profile_id = 1387)
11. 0.000 0.000 ↓ 0.0 0

Sort (cost=10,496.98..10,496.98 rows=1 width=1,524) (never executed)

  • Sort Key: p.prod_type
12. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=10,488.73..10,496.97 rows=1 width=1,524) (never executed)

  • Filter: (CASE WHEN (whp.percent IS NOT NULL) THEN whp.percent ELSE 0 END <= 0)
13. 0.000 0.000 ↓ 0.0 0

GroupAggregate (cost=10,488.58..10,488.78 rows=1 width=1,480) (never executed)

  • Group Key: p.program_id
  • Filter: (CASE WHEN ((array_agg(CASE WHEN (a.calculated_broadcast_date IS NULL) THEN a.broadcast_date ELSE a.calculated_broadcast_date END ORDER BY CASE WHEN (a.calculated_broadcast_date IS NULL) THEN a.broadcast_date ELSE a.calculated_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] IS NOT NULL) THEN true ELSE (p.broadcast_date >= '2019-06-25 14:47:51.44'::timestamp without time zone) END AND CASE WHEN ((array_agg(CASE WHEN (a.calculated_broadcast_date IS NULL) THEN a.broadcast_date ELSE a.calculated_broadcast_date END ORDER BY CASE WHEN (a.calculated_broadcast_date IS NULL) THEN a.broadcast_date ELSE a.calculated_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] IS NOT NULL) THEN true ELSE (p.broadcast_date <= '2019-07-02 14:47:51.441'::timestamp without time zone) END)
14. 0.000 0.000 ↓ 0.0 0

Sort (cost=10,488.58..10,488.59 rows=1 width=2,258) (never executed)

  • Sort Key: p.program_id
15. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=19.49..10,488.57 rows=1 width=2,258) (never executed)

16. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=19.22..10,487.18 rows=1 width=2,262) (never executed)

17. 0.000 0.000 ↓ 0.0 0

Nested Loop Anti Join (cost=18.79..10,480.31 rows=1 width=930) (never executed)

18. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=18.64..10,467.69 rows=2 width=1,014) (never executed)

19. 0.000 0.000 ↓ 0.0 0

Index Scan using sentv_user_favorite_series_pkey on sentv_user_favorite_series fs_1 (cost=0.15..32.31 rows=9 width=12) (never executed)

  • Index Cond: (profile_id = 1387)
20. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on sentv_airing a (cost=18.49..1,159.48 rows=1 width=1,018) (never executed)

  • Recheck Cond: (series_id = fs_1.series_id)
  • Filter: ((CASE WHEN (calculated_broadcast_date IS NULL) THEN broadcast_date ELSE calculated_broadcast_date END >= '2019-06-25 14:47:51.44'::timestamp without time zone) AND (CASE WHEN (calculated_broadcast_date IS NULL) THEN broadcast_date ELSE calculated_broadcast_date END <= '2019-07-02 14:47:51.441'::timestamp without time zone) AND (dvr_expiration_date <> end_date) AND (fs_1.favorite_date < CASE WHEN (type <> 'vod'::text) THEN end_date ELSE dvr_expiration_date END) AND ((age_rating || '_RESTRICTED'::text) <> ALL ('{PSVUE_PRE_PRODUCTION,PSVUE_MEDIA_OPS,PSVUE_LOCALS}'::text[])) AND ((dvr_expiration_date > now()) OR (expiration_date > now()) OR ((vod_ready_date <= now()) AND (expiration_date >= now()))) AND (CASE WHEN (type = 'vod'::text) THEN 'vod'::text WHEN (now() < start_date) THEN 'coming_up'::text WHEN ((now() > start_date) AND (now() < end_date)) THEN 'live'::text WHEN ((now() < dvr_expiration_date) AND (fs_1.favorite_date < end_date)) THEN 'dvr'::text WHEN ((CASE WHEN (type = 'vod'::text) THEN expiration_date WHEN ((now() < dvr_expiration_date) AND (fs_1.favorite_date < end_date)) THEN dvr_expiration_date WHEN (fallback_startover_date IS NOT NULL) THEN fallback_startover_date ELSE expiration_date END IS NOT NULL) AND (now() < CASE WHEN (type = 'vod'::text) THEN expiration_date WHEN ((now() < dvr_expiration_date) AND (fs_1.favorite_date < end_date)) THEN dvr_expiration_date WHEN (fallback_startover_date IS NOT NULL) THEN fallback_startover_date ELSE expiration_date END)) THEN 'catchup'::text WHEN vod_replacement_available THEN 'vod'::text ELSE 'no_longer_available'::text END <> 'no_longer_available'::text) AND (((CASE WHEN (type = 'vod'::text) THEN 'vod'::text WHEN (now() < start_date) THEN 'coming_up'::text WHEN ((now() > start_date) AND (now() < end_date)) THEN 'live'::text WHEN ((now() < dvr_expiration_date) AND (fs_1.favorite_date < end_date)) THEN 'dvr'::text WHEN ((CASE WHEN (type = 'vod'::text) THEN expiration_date WHEN ((now() < dvr_expiration_date) AND (fs_1.favorite_date < end_date)) THEN dvr_expiration_date WHEN (fallback_startover_date IS NOT NULL) THEN fallback_startover_date ELSE expiration_date END IS NOT NULL) AND (now() < CASE WHEN (type = 'vod'::text) THEN expiration_date WHEN ((now() < dvr_expiration_date) AND (fs_1.favorite_date < end_date)) THEN dvr_expiration_date WHEN (fallback_startover_date IS NOT NULL) THEN fallback_startover_date ELSE expiration_date END)) THEN 'catchup'::text WHEN vod_replacement_available THEN 'vod'::text ELSE 'no_longer_available'::text END <> 'vod'::text) AND (((fs_1.favorite_date < end_date) AND (dvr_expiration_date > now())) OR (expiration_date > now()))) OR ((CASE WHEN (type = 'vod'::text) THEN 'vod'::text WHEN (now() < start_date) THEN 'coming_up'::text WHEN ((now() > start_date) AND (now() < end_date)) THEN 'live'::text WHEN ((now() < dvr_expiration_date) AND (fs_1.favorite_date < end_date)) THEN 'dvr'::text WHEN ((CASE WHEN (type = 'vod'::text) THEN expiration_date WHEN ((now() < dvr_expiration_date) AND (fs_1.favorite_date < end_date)) THEN dvr_expiration_date WHEN (fallback_startover_date IS NOT NULL) THEN fallback_startover_date ELSE expiration_date END IS NOT NULL) AND (now() < CASE WHEN (type = 'vod'::text) THEN expiration_date WHEN ((now() < dvr_expiration_date) AND (fs_1.favorite_date < end_date)) THEN dvr_expiration_date WHEN (fallback_startover_date IS NOT NULL) THEN fallback_startover_date ELSE expiration_date END)) THEN 'catchup'::text WHEN vod_replacement_available THEN 'vod'::text ELSE 'no_longer_available'::text END = 'vod'::text) AND (vod_ready_date <= now()) AND (expiration_date >= now()))))
21. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on sentv_airing_series_id_idx (cost=0.00..18.49 rows=275 width=0) (never executed)

  • Index Cond: (series_id = fs_1.series_id)
22. 0.000 0.000 ↓ 0.0 0

Index Scan using sentv_blackout_rule_pkey on sentv_blackout_rule b (cost=0.15..6.28 rows=5 width=164) (never executed)

  • Index Cond: ((rule_name)::text = ANY (a.bo_rules))
  • Filter: CASE WHEN (('ALL'::text = ANY (dmas)) OR ('10011'::text = ANY (zipcodes)) OR ('PS4'::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
23. 0.000 0.000 ↓ 0.0 0

Index Scan using sentv_program_pkey on sentv_program p (cost=0.42..6.86 rows=1 width=1,336) (never executed)

  • Index Cond: (program_id = a.program_id)
  • Filter: (((season_id IS NULL) OR (season_id > 0) OR (s.has_only_season_extra IS TRUE)) AND (series_id = s.series_id))
24. 0.000 0.000 ↓ 0.0 0

Index Scan using sentv_channel_channel_id_idx on sentv_channel c (cost=0.28..1.39 rows=1 width=4) (never executed)

  • Index Cond: (channel_id = a.channel_id)
  • Filter: ((cardinality(region_dma_codes) > 0) AND (('SUPER'::text = ANY ('{PSVUE_PRE_PRODUCTION,PSVUE_MEDIA_OPS,PSVUE_LOCALS}'::text[])) OR ('{PSVUE_PRE_PRODUCTION,PSVUE_MEDIA_OPS,PSVUE_LOCALS}'::text[] && ent_keywords)) AND (((channel_id)::text || '_RESTRICTED'::text) <> ALL ('{PSVUE_PRE_PRODUCTION,PSVUE_MEDIA_OPS,PSVUE_LOCALS}'::text[])))
25. 0.000 0.000 ↓ 0.0 0

Index Scan using sentv_user_program_watch_history_pkey on sentv_user_program_watch_history whp (cost=0.15..8.17 rows=1 width=48) (never executed)

  • Index Cond: ((profile_id = 1387) AND (program_id = p.program_id))
26. 0.002 0.013 ↓ 0.0 0 1

Sort (cost=111.17..111.17 rows=1 width=1,556) (actual time=0.012..0.013 rows=0 loops=1)

  • Sort Key: p_1.prod_type
  • Sort Method: quicksort Memory: 25kB
27. 0.000 0.011 ↓ 0.0 0 1

Nested Loop Left Join (cost=102.92..111.16 rows=1 width=1,556) (actual time=0.011..0.011 rows=0 loops=1)

  • Filter: (CASE WHEN (whp_1.percent IS NOT NULL) THEN whp_1.percent ELSE 0 END <= 0)
28. 0.000 0.011 ↓ 0.0 0 1

GroupAggregate (cost=102.77..102.96 rows=1 width=1,488) (actual time=0.011..0.011 rows=0 loops=1)

  • Group Key: p_1.program_id, fp.favorite_date
  • Filter: (CASE WHEN ((array_agg(CASE WHEN (a_1.calculated_broadcast_date IS NULL) THEN a_1.broadcast_date ELSE a_1.calculated_broadcast_date END ORDER BY CASE WHEN (a_1.calculated_broadcast_date IS NULL) THEN a_1.broadcast_date ELSE a_1.calculated_broadcast_date END DESC, CASE WHEN (a_1.start_date <= now()) THEN a_1.start_date ELSE '-infinity'::timestamp without time zone END DESC, CASE WHEN (a_1.start_date > now()) THEN a_1.start_date ELSE 'infinity'::timestamp without time zone END, a_1.airing_id))[1] IS NOT NULL) THEN true ELSE (p_1.broadcast_date >= '2019-06-25 14:47:51.44'::timestamp without time zone) END AND CASE WHEN ((array_agg(CASE WHEN (a_1.calculated_broadcast_date IS NULL) THEN a_1.broadcast_date ELSE a_1.calculated_broadcast_date END ORDER BY CASE WHEN (a_1.calculated_broadcast_date IS NULL) THEN a_1.broadcast_date ELSE a_1.calculated_broadcast_date END DESC, CASE WHEN (a_1.start_date <= now()) THEN a_1.start_date ELSE '-infinity'::timestamp without time zone END DESC, CASE WHEN (a_1.start_date > now()) THEN a_1.start_date ELSE 'infinity'::timestamp without time zone END, a_1.airing_id))[1] IS NOT NULL) THEN true ELSE (p_1.broadcast_date <= '2019-07-02 14:47:51.441'::timestamp without time zone) END)
29. 0.002 0.011 ↓ 0.0 0 1

Sort (cost=102.77..102.77 rows=1 width=2,266) (actual time=0.011..0.011 rows=0 loops=1)

  • Sort Key: p_1.program_id, fp.favorite_date
  • Sort Method: quicksort Memory: 25kB
30. 0.001 0.009 ↓ 0.0 0 1

Nested Loop Anti Join (cost=20.52..102.76 rows=1 width=2,266) (actual time=0.009..0.009 rows=0 loops=1)

31. 0.000 0.008 ↓ 0.0 0 1

Nested Loop (cost=20.37..90.29 rows=1 width=2,350) (actual time=0.008..0.008 rows=0 loops=1)

32. 0.001 0.008 ↓ 0.0 0 1

Nested Loop (cost=20.09..88.89 rows=1 width=2,354) (actual time=0.008..0.008 rows=0 loops=1)

  • Join Filter: ((fp_1.program_id = a_1.program_id) AND (fp_1.favorite_date < CASE WHEN (a_1.type <> 'vod'::text) THEN a_1.end_date ELSE a_1.dvr_expiration_date END) 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 (fp_1.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 (fp_1.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 (fp_1.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) 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 (fp_1.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 (fp_1.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 (fp_1.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 (((fp_1.favorite_date < a_1.end_date) AND (a_1.dvr_expiration_date > now())) OR (a_1.expiration_date > now()))) OR ((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 (fp_1.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 (fp_1.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 (fp_1.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 (a_1.vod_ready_date <= now()) AND (a_1.expiration_date >= now()))))
33. 0.000 0.007 ↓ 0.0 0 1

Nested Loop Left Join (cost=19.67..39.49 rows=1 width=1,360) (actual time=0.007..0.007 rows=0 loops=1)

  • Filter: ((p_1.season_id IS NULL) OR (p_1.season_id > 0) OR (s_1.has_only_season_extra IS TRUE))
34. 0.000 0.007 ↓ 0.0 0 1

Nested Loop (cost=19.52..38.14 rows=1 width=1,364) (actual time=0.007..0.007 rows=0 loops=1)

35. 0.000 0.007 ↓ 0.0 0 1

Hash Join (cost=19.10..29.69 rows=1 width=24) (actual time=0.007..0.007 rows=0 loops=1)

  • Hash Cond: (fp.program_id = fp_1.program_id)
36. 0.001 0.007 ↓ 0.0 0 1

Bitmap Heap Scan on sentv_user_favorite_program fp (cost=4.22..14.76 rows=9 width=12) (actual time=0.007..0.007 rows=0 loops=1)

  • Recheck Cond: (profile_id = 1387)
37. 0.006 0.006 ↓ 0.0 0 1

Bitmap Index Scan on sentv_user_favorite_program_pkey (cost=0.00..4.22 rows=9 width=0) (actual time=0.006..0.006 rows=0 loops=1)

  • Index Cond: (profile_id = 1387)
38. 0.000 0.000 ↓ 0.0 0

Hash (cost=14.76..14.76 rows=9 width=12) (never executed)

39. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on sentv_user_favorite_program fp_1 (cost=4.22..14.76 rows=9 width=12) (never executed)

  • Recheck Cond: (profile_id = 1387)
40. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on sentv_user_favorite_program_pkey (cost=0.00..4.22 rows=9 width=0) (never executed)

  • Index Cond: (profile_id = 1387)
41. 0.000 0.000 ↓ 0.0 0

Index Scan using sentv_program_pkey on sentv_program p_1 (cost=0.42..8.44 rows=1 width=1,340) (never executed)

  • Index Cond: (program_id = fp_1.program_id)
42. 0.000 0.000 ↓ 0.0 0

Index Scan using sentv_series_series_id_idx on sentv_series s_1 (cost=0.14..1.34 rows=1 width=5) (never executed)

  • Index Cond: (p_1.series_id = series_id)
43. 0.000 0.000 ↓ 0.0 0

Index Scan using sentv_airing_program_id_idx on sentv_airing a_1 (cost=0.43..49.21 rows=1 width=1,014) (never executed)

  • Index Cond: (program_id = p_1.program_id)
  • Filter: ((CASE WHEN (calculated_broadcast_date IS NULL) THEN broadcast_date ELSE calculated_broadcast_date END >= '2019-06-25 14:47:51.44'::timestamp without time zone) AND (CASE WHEN (calculated_broadcast_date IS NULL) THEN broadcast_date ELSE calculated_broadcast_date END <= '2019-07-02 14:47:51.441'::timestamp without time zone) AND (dvr_expiration_date <> end_date) AND ((age_rating || '_RESTRICTED'::text) <> ALL ('{PSVUE_PRE_PRODUCTION,PSVUE_MEDIA_OPS,PSVUE_LOCALS}'::text[])) AND ((dvr_expiration_date > now()) OR (expiration_date > now()) OR ((vod_ready_date <= now()) AND (expiration_date >= now()))))
44. 0.000 0.000 ↓ 0.0 0

Index Scan using sentv_channel_channel_id_idx on sentv_channel c_1 (cost=0.28..1.39 rows=1 width=4) (never executed)

  • Index Cond: (channel_id = a_1.channel_id)
  • Filter: ((cardinality(region_dma_codes) > 0) AND (('SUPER'::text = ANY ('{PSVUE_PRE_PRODUCTION,PSVUE_MEDIA_OPS,PSVUE_LOCALS}'::text[])) OR ('{PSVUE_PRE_PRODUCTION,PSVUE_MEDIA_OPS,PSVUE_LOCALS}'::text[] && ent_keywords)) AND (((channel_id)::text || '_RESTRICTED'::text) <> ALL ('{PSVUE_PRE_PRODUCTION,PSVUE_MEDIA_OPS,PSVUE_LOCALS}'::text[])))
45. 0.000 0.000 ↓ 0.0 0

Index Scan using sentv_blackout_rule_pkey on sentv_blackout_rule b_1 (cost=0.15..6.28 rows=5 width=164) (never executed)

  • Index Cond: ((rule_name)::text = ANY (a_1.bo_rules))
  • Filter: CASE WHEN (('ALL'::text = ANY (dmas)) OR ('10011'::text = ANY (zipcodes)) OR ('PS4'::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
46. 0.000 0.000 ↓ 0.0 0

Index Scan using sentv_user_program_watch_history_pkey on sentv_user_program_watch_history whp_1 (cost=0.15..8.17 rows=1 width=48) (never executed)

  • Index Cond: ((profile_id = 1387) AND (program_id = p_1.program_id))
Planning time : 10.453 ms
Execution time : 0.449 ms