QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Unique (cost=10675.55..10675.56 rows=2 width=52) (actual time=758.259..758.259 rows=0 loops=1) -> Sort (cost=10675.55..10675.55 rows=2 width=52) (actual time=758.250..758.250 rows=0 loops=1) Sort Key: t8.id -> Nested Loop (cost=0.00..10675.54 rows=2 width=52) (actual time=758.055..758.055 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..7966.45 rows=698 width=108) (actual time=113.843..458.416 rows=1104 loops=1) -> Nested Loop (cost=0.00..5463.73 rows=703 width=59) (actual time=92.699..398.968 rows=1104 loops=1) -> Nested Loop (cost=0.00..1287.57 rows=186 width=51) (actual time=39.570..128.132 rows=332 loops=1) -> Nested Loop (cost=0.00..755.75 rows=135 width=54) (actual time=39.448..118.909 rows=336 loops=1) -> Nested Loop (cost=0.00..98.83 rows=211 width=35) (actual time=19.050..27.403 rows=376 loops=1) -> Nested Loop (cost=0.00..58.75 rows=5 width=27) (actual time=18.892..19.081 rows=4 loops=1) -> Index Scan using idx_day_part_du on day_part t10 (cost=0.00..8.41 rows=8 width=20) (actual time=18.739..18.775 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=0.028..0.031 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.85 rows=93 width=30) (actual time=0.053..1.382 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.10 rows=1 width=19) (actual time=0.226..0.229 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..3.93 rows=1 width=30) (actual time=0.009..0.013 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..22.09 rows=29 width=30) (actual time=0.694..0.784 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.55 rows=1 width=60) (actual time=0.034..0.039 rows=1 loops=1104) Index Cond: (t6.id = t8.bundle_id) -> Index Scan using content_pkey on content t9 (cost=0.00..3.83 rows=1 width=19) (actual time=0.227..0.231 rows=1 loops=1104) Index Cond: (t8.content_id = t9.id) Total runtime: 759.001 ms (34 rows)