QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Unique (cost=9832.91..9832.92 rows=2 width=52) (actual time=623.808..623.808 rows=0 loops=1) -> Sort (cost=9832.91..9832.92 rows=2 width=52) (actual time=623.799..623.799 rows=0 loops=1) Sort Key: t8.id -> Nested Loop (cost=0.00..9832.90 rows=2 width=52) (actual time=623.467..623.467 rows=0 loops=1) Join Filter: ((t2.not_modified_since >= to_timestamp('2009-02-24T11:19:57'::text, 'YYYY/MM/DD HH:MI:SS'::text)) OR (t3.not_modified_since >= to_timestamp('2009-02-24T11:19:57'::text, 'YYYY/MM/DD HH:MI:SS'::text)) OR (t6.not_modified_since >= to_timestamp('2009-02-24T11:19:57'::text, 'YYYY/MM/DD HH:MI:SS'::text)) OR (t7.not_modified_since >= to_timestamp('2009-02-24T11:19:57'::text, 'YYYY/MM/DD HH:MI:SS'::text)) OR (t8.not_modified_since >= to_timestamp('2009-02-24T11:19:57'::text, 'YYYY/MM/DD HH:MI:SS'::text)) OR (t9.not_modified_since >= to_timestamp('2009-02-24T11:19:57'::text, 'YYYY/MM/DD HH:MI:SS'::text)) OR (t10.not_modified_since >= to_timestamp('2009-02-24T11:19:57'::text, 'YYYY/MM/DD HH:MI:SS'::text)) OR (t11.not_modified_since >= to_timestamp('2009-02-24T11:19:57'::text, 'YYYY/MM/DD HH:MI:SS'::text))) -> Nested Loop (cost=0.00..7381.49 rows=598 width=108) (actual time=75.634..556.642 rows=1104 loops=1) -> Nested Loop (cost=0.00..5087.76 rows=602 width=59) (actual time=71.744..523.690 rows=1104 loops=1) -> Nested Loop (cost=0.00..1171.66 rows=165 width=51) (actual time=66.427..499.798 rows=332 loops=1) -> Nested Loop (cost=0.00..684.77 rows=117 width=54) (actual time=38.266..440.024 rows=336 loops=1) -> Nested Loop (cost=0.00..84.08 rows=182 width=35) (actual time=16.785..402.046 rows=376 loops=1) -> Nested Loop (cost=0.00..52.33 rows=4 width=27) (actual time=11.355..11.547 rows=4 loops=1) -> Index Scan using idx_day_part_du on day_part t10 (cost=0.00..8.28 rows=7 width=19) (actual time=0.713..0.748 rows=7 loops=1) Index Cond: (display_unit_id = 250893::numeric) Filter: (active <> 0::numeric) -> Index Scan using idx_skin_day_part_id on skin t2 (cost=0.00..6.28 rows=1 width=30) (actual time=1.526..1.529 rows=1 loops=7) Index Cond: (t2.day_part_id = t10.id) Filter: (active <> 0::numeric) -> Index Scan using idx_skin_slot_skin_id on skin_slot t11 (cost=0.00..6.81 rows=90 width=30) (actual time=1.370..96.925 rows=94 loops=4) Index Cond: (t2.id = t11.skin_id) Filter: (active <> 0::numeric) -> Index Scan using loop_slot_pkey on loop_slot t3 (cost=0.00..3.29 rows=1 width=19) (actual time=0.083..0.087 rows=1 loops=376) Index Cond: (t11.slot_id = t3.id) Filter: (active <> 0::numeric) -> Index Scan using idx_schedule_owner_resource_id on schedule t7 (cost=0.00..4.15 rows=1 width=30) (actual time=0.154..0.163 rows=1 loops=336) Index Cond: (t3.id = t7.owner_resource_id) Filter: (active <> 0::numeric) -> Index Scan using idx_bundle_schedule_id on bundle t6 (cost=0.00..23.37 rows=29 width=30) (actual time=0.025..0.040 rows=3 loops=332) Index Cond: (t6.schedule_id = t7.id) Filter: (active <> 0::numeric) -> Index Scan using idx_bundle_content_bundle_id on bundle_content t8 (cost=0.00..3.80 rows=1 width=60) (actual time=0.011..0.015 rows=1 loops=1104) Index Cond: (t6.id = t8.bundle_id) -> Index Scan using content_pkey on content t9 (cost=0.00..4.05 rows=1 width=19) (actual time=0.013..0.017 rows=1 loops=1104) Index Cond: (t8.content_id = t9.id) Total runtime: 624.366 ms (34 rows)