explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yxos : Optimization for: Optimization for: plan #QjWn; plan #4SRP

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.846 25.340 ↑ 1.0 601 1

Hash Join (cost=475.58..664.69 rows=601 width=1,417) (actual time=19.807..25.340 rows=601 loops=1)

  • Hash Cond: (p_a.page_id = pageentity5_.id)
2. 3.881 23.578 ↑ 1.0 601 1

Hash Join (cost=437.83..625.35 rows=601 width=762) (actual time=18.880..23.578 rows=601 loops=1)

  • Hash Cond: (a1.id = p_a.id)
3. 4.718 4.718 ↑ 1.0 4,110 1

Seq Scan on assignments a1 (cost=0.00..166.10 rows=4,110 width=89) (actual time=0.003..4.718 rows=4,110 loops=1)

4. 2.295 14.979 ↑ 1.0 601 1

Hash (cost=430.31..430.31 rows=601 width=689) (actual time=14.979..14.979 rows=601 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 422kB
5. 5.972 12.684 ↑ 1.0 601 1

Hash Join (cost=340.72..430.31 rows=601 width=689) (actual time=4.942..12.684 rows=601 loops=1)

  • Hash Cond: (p_a.module_assignment_id = ma.id)
6. 4.039 4.039 ↑ 1.0 3,606 1

Seq Scan on page_assignments p_a (cost=0.00..70.06 rows=3,606 width=48) (actual time=0.003..4.039 rows=3,606 loops=1)

7. 0.104 2.673 ↑ 1.0 70 1

Hash (cost=339.85..339.85 rows=70 width=657) (actual time=2.673..2.673 rows=70 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 54kB
8. 0.113 2.569 ↑ 1.0 70 1

Hash Join (cost=190.46..339.85 rows=70 width=657) (actual time=1.790..2.569 rows=70 loops=1)

  • Hash Cond: (ma.module_id = m.id)
9. 0.160 2.327 ↑ 1.0 70 1

Nested Loop (cost=183.88..333.08 rows=70 width=439) (actual time=1.640..2.327 rows=70 loops=1)

10. 0.314 2.027 ↑ 1.0 70 1

Hash Join (cost=183.60..198.08 rows=70 width=350) (actual time=1.628..2.027 rows=70 loops=1)

  • Hash Cond: (ma.program_assignment_id = pa.id)
11. 0.246 0.246 ↑ 1.0 420 1

Seq Scan on module_assignments ma (cost=0.00..12.20 rows=420 width=48) (actual time=0.003..0.246 rows=420 loops=1)

12. 0.030 1.467 ↑ 1.0 14 1

Hash (cost=183.43..183.43 rows=14 width=318) (actual time=1.467..1.467 rows=14 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
13. 0.023 1.437 ↑ 1.0 14 1

Hash Join (cost=5.20..183.43 rows=14 width=318) (actual time=1.286..1.437 rows=14 loops=1)

  • Hash Cond: (pa.program_id = p.id)
14. 0.329 1.391 ↑ 1.0 14 1

Hash Join (cost=3.89..182.06 rows=14 width=121) (actual time=1.254..1.391 rows=14 loops=1)

  • Hash Cond: (a.id = pa.id)
15. 0.975 0.975 ↑ 1.0 685 1

Seq Scan on assignments a (cost=0.00..176.38 rows=685 width=89) (actual time=0.003..0.975 rows=685 loops=1)

  • Filter: (assignee_id = '6789fb1d-0f4f-49bd-a5cf-33d915dba71c'::uuid)
  • Rows Removed by Filter: 3425
16. 0.038 0.087 ↑ 1.0 84 1

Hash (cost=2.84..2.84 rows=84 width=32) (actual time=0.087..0.087 rows=84 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
17. 0.049 0.049 ↑ 1.0 84 1

Seq Scan on program_assignments pa (cost=0.00..2.84 rows=84 width=32) (actual time=0.002..0.049 rows=84 loops=1)

18. 0.012 0.023 ↑ 1.0 14 1

Hash (cost=1.14..1.14 rows=14 width=197) (actual time=0.022..0.023 rows=14 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
19. 0.011 0.011 ↑ 1.0 14 1

Seq Scan on programs p (cost=0.00..1.14 rows=14 width=197) (actual time=0.003..0.011 rows=14 loops=1)

20. 0.140 0.140 ↑ 1.0 1 70

Index Scan using assignments_pkey on assignments a2 (cost=0.28..1.93 rows=1 width=89) (actual time=0.002..0.002 rows=1 loops=70)

  • Index Cond: (id = ma.id)
21. 0.073 0.129 ↑ 1.0 70 1

Hash (cost=5.70..5.70 rows=70 width=218) (actual time=0.129..0.129 rows=70 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 26kB
22. 0.056 0.056 ↑ 1.0 70 1

Seq Scan on modules m (cost=0.00..5.70 rows=70 width=218) (actual time=0.003..0.056 rows=70 loops=1)

23. 0.453 0.916 ↑ 1.0 700 1

Hash (cost=29.00..29.00 rows=700 width=591) (actual time=0.916..0.916 rows=700 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 84kB
24. 0.463 0.463 ↑ 1.0 700 1

Seq Scan on pages pageentity5_ (cost=0.00..29.00 rows=700 width=591) (actual time=0.004..0.463 rows=700 loops=1)

Planning time : 2.200 ms