explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lY34

Settings
# exclusive inclusive rows x rows loops node
1. 2.743 33.040 ↓ 1.0 7,909 1

Hash Left Join (cost=1,674.49..2,165.13 rows=7,849 width=273) (actual time=13.650..33.040 rows=7,909 loops=1)

  • Output: ci.id, ci.name, ci.from_date, ci.until_date, ci.brand, ci.interval_reference, ci.additional_reference, mc.id, mc.name, p.name, a.name, a1.assignee, a1.assignment_state, a2.assignee, a2.assignment_state, tm.assignee, tm.assignment_state
  • Inner Unique: true
  • Hash Cond: (ci.id = tm.campaign_item_id)
2. 2.895 28.838 ↓ 1.0 7,909 1

Hash Left Join (cost=1,325.99..1,796.02 rows=7,849 width=255) (actual time=12.174..28.838 rows=7,909 loops=1)

  • Output: ci.id, ci.name, ci.from_date, ci.until_date, ci.brand, ci.interval_reference, ci.additional_reference, mc.id, mc.name, p.name, a.name, a1.assignee, a1.assignment_state, a2.assignee, a2.assignment_state
  • Inner Unique: true
  • Hash Cond: (ci.id = a2.campaign_item_id)
3. 2.985 22.127 ↓ 1.0 7,909 1

Hash Left Join (cost=906.76..1,356.18 rows=7,849 width=237) (actual time=8.319..22.127 rows=7,909 loops=1)

  • Output: ci.id, ci.name, ci.from_date, ci.until_date, ci.brand, ci.interval_reference, ci.additional_reference, mc.id, mc.name, p.name, a.name, a1.assignee, a1.assignment_state
  • Inner Unique: true
  • Hash Cond: (ci.id = a1.campaign_item_id)
4. 2.842 14.664 ↓ 1.0 7,909 1

Hash Join (cost=482.74..911.54 rows=7,849 width=219) (actual time=3.800..14.664 rows=7,909 loops=1)

  • Output: ci.id, ci.name, ci.from_date, ci.until_date, ci.brand, ci.interval_reference, ci.additional_reference, mc.id, mc.name, p.name, a.name
  • Inner Unique: true
  • Hash Cond: (mc.account_id = a.id)
5. 2.313 8.852 ↓ 1.0 7,909 1

Hash Join (cost=69.29..477.48 rows=7,849 width=214) (actual time=0.797..8.852 rows=7,909 loops=1)

  • Output: ci.id, ci.name, ci.from_date, ci.until_date, ci.brand, ci.interval_reference, ci.additional_reference, mc.id, mc.name, mc.account_id, p.name
  • Inner Unique: true
  • Hash Cond: (ci.ad_spec_id = p.id)
6. 2.793 6.503 ↓ 1.0 7,909 1

Hash Join (cost=66.92..453.07 rows=7,849 width=215) (actual time=0.751..6.503 rows=7,909 loops=1)

  • Output: ci.id, ci.name, ci.from_date, ci.until_date, ci.brand, ci.interval_reference, ci.additional_reference, ci.ad_spec_id, mc.id, mc.name, mc.account_id
  • Inner Unique: true
  • Hash Cond: (ci.media_campaign_id = mc.id)
7. 2.975 2.975 ↓ 1.0 7,909 1

Seq Scan on public.campaign_item ci (cost=0.00..365.49 rows=7,849 width=172) (actual time=0.003..2.975 rows=7,909 loops=1)

  • Output: ci.id, ci.name, ci.from_date, ci.until_date, ci.brand, ci.interval_reference, ci.additional_reference, ci.media_campaign_id, ci.ad_spec_id
8. 0.403 0.735 ↑ 1.0 1,463 1

Hash (cost=48.63..48.63 rows=1,463 width=62) (actual time=0.735..0.735 rows=1,463 loops=1)

  • Output: mc.id, mc.name, mc.account_id
  • Buckets: 2,048 Batches: 1 Memory Usage: 152kB
9. 0.332 0.332 ↑ 1.0 1,463 1

Seq Scan on public.media_campaign mc (cost=0.00..48.63 rows=1,463 width=62) (actual time=0.004..0.332 rows=1,463 loops=1)

  • Output: mc.id, mc.name, mc.account_id
10. 0.021 0.036 ↓ 1.0 64 1

Hash (cost=1.61..1.61 rows=61 width=37) (actual time=0.036..0.036 rows=64 loops=1)

  • Output: p.name, p.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 13kB
11. 0.015 0.015 ↓ 1.0 64 1

Seq Scan on public.ad_spec p (cost=0.00..1.61 rows=61 width=37) (actual time=0.007..0.015 rows=64 loops=1)

  • Output: p.name, p.id
12. 1.662 2.970 ↓ 1.0 6,773 1

Hash (cost=329.31..329.31 rows=6,731 width=42) (actual time=2.970..2.970 rows=6,773 loops=1)

  • Output: a.name, a.id
  • Buckets: 8,192 Batches: 1 Memory Usage: 567kB
13. 1.308 1.308 ↓ 1.0 6,773 1

Seq Scan on public.account a (cost=0.00..329.31 rows=6,731 width=42) (actual time=0.004..1.308 rows=6,773 loops=1)

  • Output: a.name, a.id
14. 2.314 4.478 ↑ 1.0 7,027 1

Hash (cost=336.19..336.19 rows=7,027 width=37) (actual time=4.478..4.478 rows=7,027 loops=1)

  • Output: a1.assignee, a1.assignment_state, a1.campaign_item_id
  • Buckets: 8,192 Batches: 1 Memory Usage: 547kB
15. 2.164 2.164 ↑ 1.0 7,027 1

Seq Scan on public.campaign_item_assignment_data a1 (cost=0.00..336.19 rows=7,027 width=37) (actual time=0.007..2.164 rows=7,027 loops=1)

  • Output: a1.assignee, a1.assignment_state, a1.campaign_item_id
  • Filter: (a1.assignee_role = 'A1'::assignment_role)
  • Rows Removed by Filter: 7,628
16. 1.808 3.816 ↑ 1.0 6,643 1

Hash (cost=336.19..336.19 rows=6,643 width=37) (actual time=3.816..3.816 rows=6,643 loops=1)

  • Output: a2.assignee, a2.assignment_state, a2.campaign_item_id
  • Buckets: 8,192 Batches: 1 Memory Usage: 525kB
17. 2.008 2.008 ↑ 1.0 6,643 1

Seq Scan on public.campaign_item_assignment_data a2 (cost=0.00..336.19 rows=6,643 width=37) (actual time=0.544..2.008 rows=6,643 loops=1)

  • Output: a2.assignee, a2.assignment_state, a2.campaign_item_id
  • Filter: (a2.assignee_role = 'A2'::assignment_role)
  • Rows Removed by Filter: 8,012
18. 0.246 1.459 ↑ 1.0 985 1

Hash (cost=336.19..336.19 rows=985 width=37) (actual time=1.459..1.459 rows=985 loops=1)

  • Output: tm.assignee, tm.assignment_state, tm.campaign_item_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 77kB
19. 1.213 1.213 ↑ 1.0 985 1

Seq Scan on public.campaign_item_assignment_data tm (cost=0.00..336.19 rows=985 width=37) (actual time=1.009..1.213 rows=985 loops=1)

  • Output: tm.assignee, tm.assignment_state, tm.campaign_item_id
  • Filter: (tm.assignee_role = 'TM'::assignment_role)
  • Rows Removed by Filter: 13,670
Planning time : 2.566 ms
Execution time : 33.546 ms