QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Unique (cost=6986.01..6986.02 rows=1 width=20) (actual time=611.061..611.061 rows=0 loops=1) -> Sort (cost=6986.01..6986.02 rows=1 width=20) (actual time=611.053..611.053 rows=0 loops=1) Sort Key: t8.id -> Nested Loop (cost=955.90..6986.00 rows=1 width=20) (actual time=610.942..610.942 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=955.90..4989.27 rows=523 width=76) (actual time=28.274..548.664 rows=1104 loops=1) -> Hash Join (cost=955.90..3195.56 rows=526 width=52) (actual time=28.123..520.620 rows=1104 loops=1) Hash Cond: (t6.schedule_id = t7.id) -> Seq Scan on bundle t6 (cost=0.00..2002.69 rows=61789 width=16) (actual time=0.026..253.360 rows=60920 loops=1) Filter: (active <> 0) -> Hash (cost=954.15..954.15 rows=140 width=44) (actual time=25.795..25.795 rows=332 loops=1) -> Nested Loop (cost=0.00..954.15 rows=140 width=44) (actual time=0.546..24.364 rows=332 loops=1) -> Nested Loop (cost=0.00..562.62 rows=100 width=40) (actual time=0.471..15.759 rows=336 loops=1) -> Nested Loop (cost=0.00..74.40 rows=156 width=28) (actual time=0.233..6.404 rows=376 loops=1) -> Nested Loop (cost=0.00..45.04 rows=4 width=20) (actual time=0.157..0.324 rows=4 loops=1) -> Index Scan using idx_day_part_du on day_part t10 (cost=0.00..7.30 rows=6 width=12) (actual time=0.076..0.108 rows=7 loops=1) Index Cond: (display_unit_id = 250893) Filter: (active <> 0) -> Index Scan using idx_skin_day_part_id on skin t2 (cost=0.00..6.28 rows=1 width=16) (actual time=0.016..0.018 rows=1 loops=7) Index Cond: (t2.day_part_id = t10.id) Filter: (active <> 0) -> Index Scan using idx_skin_slot_skin_id on skin_slot t11 (cost=0.00..6.09 rows=100 width=16) (actual time=0.030..0.817 rows=94 loops=4) Index Cond: (t2.id = t11.skin_id) Filter: (active <> 0) -> Index Scan using loop_slot_pkey on loop_slot t3 (cost=0.00..3.12 rows=1 width=12) (actual time=0.007..0.011 rows=1 loops=376) Index Cond: (t11.slot_id = t3.id) Filter: (active <> 0) -> Index Scan using idx_schedule_owner_resource_id on schedule t7 (cost=0.00..3.90 rows=1 width=16) (actual time=0.007..0.011 rows=1 loops=336) Index Cond: (t3.id = t7.owner_resource_id) Filter: (active <> 0) -> Index Scan using idx_bundle_content_bundle_id on bundle_content t8 (cost=0.00..3.40 rows=1 width=28) (actual time=0.007..0.011 rows=1 loops=1104) Index Cond: (t6.id = t8.bundle_id) -> Index Scan using content_pkey on content t9 (cost=0.00..3.77 rows=1 width=12) (actual time=0.007..0.011 rows=1 loops=1104) Index Cond: (t8.content_id = t9.id) Total runtime: 611.680 ms (35 rows)