QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Unique (cost=7384.05..7384.06 rows=1 width=37) (actual time=1273.060..1273.060 rows=0 loops=1) -> Sort (cost=7384.05..7384.06 rows=1 width=37) (actual time=1273.052..1273.052 rows=0 loops=1) Sort Key: t8.id Sort Method: quicksort Memory: 17kB -> Nested Loop (cost=3303.53..7384.04 rows=1 width=37) (actual time=1272.976..1272.976 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))) -> Hash Join (cost=3303.53..5208.77 rows=515 width=93) (actual time=863.416..1209.038 rows=1104 loops=1) Hash Cond: (t8.bundle_id = t6.id) -> Seq Scan on bundle_content t8 (cost=0.00..1639.06 rows=69606 width=45) (actual time=0.077..272.391 rows=69606 loops=1) -> Hash (cost=3297.06..3297.06 rows=518 width=56) (actual time=651.968..651.968 rows=1104 loops=1) -> Hash Join (cost=1040.33..3297.06 rows=518 width=56) (actual time=127.291..646.867 rows=1104 loops=1) Hash Cond: (t6.schedule_id = t7.id) -> Seq Scan on bundle t6 (cost=0.00..2023.55 rows=60798 width=24) (actual time=0.055..273.351 rows=60919 loops=1) Filter: (active <> 0::numeric) -> Hash (cost=1038.54..1038.54 rows=143 width=48) (actual time=124.746..124.746 rows=332 loops=1) -> Nested Loop (cost=77.89..1038.54 rows=143 width=48) (actual time=46.253..123.164 rows=332 loops=1) -> Hash Join (cost=77.89..563.45 rows=105 width=49) (actual time=42.417..109.635 rows=336 loops=1) Hash Cond: (t3.id = t11.slot_id) -> Seq Scan on loop_slot t3 (cost=0.00..380.55 rows=9241 width=16) (actual time=0.049..42.454 rows=8950 loops=1) Filter: (active <> 0::numeric) -> Hash (cost=75.90..75.90 rows=159 width=33) (actual time=32.526..32.526 rows=376 loops=1) -> Nested Loop (cost=0.00..75.90 rows=159 width=33) (actual time=21.187..30.820 rows=376 loops=1) -> Nested Loop (cost=0.00..45.17 rows=4 width=24) (actual time=15.635..15.847 rows=4 loops=1) -> Index Scan using idx_day_part_du on day_part t10 (cost=0.00..7.42 rows=6 width=16) (actual time=5.379..5.413 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=24) (actual time=1.474..1.477 rows=1 loops=7) Index Cond: (t2.day_part_id = t10.id) Filter: (t2.active <> 0::numeric) -> Index Scan using idx_skin_slot_skin_id on skin_slot t11 (cost=0.00..6.52 rows=93 width=25) (actual time=1.416..3.037 rows=94 loops=4) Index Cond: (t11.skin_id = t2.id) Filter: (t11.active <> 0::numeric) -> Index Scan using idx_schedule_owner_resource_id on schedule t7 (cost=0.00..4.51 rows=1 width=24) (actual time=0.022..0.026 rows=1 loops=336) Index Cond: (t7.owner_resource_id = t3.id) Filter: (t7.active <> 0::numeric) -> Index Scan using content_pkey on content t9 (cost=0.00..4.17 rows=1 width=16) (actual time=0.011..0.015 rows=1 loops=1104) Index Cond: (t9.id = t8.content_id) Total runtime: 1273.601 ms (38 rows)