explain.depesz.com

PostgreSQL's explain analyze made readable

Result: QjWn

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.944 33.343 ↑ 1.0 601 1

Hash Join (cost=462.91..652.02 rows=601 width=1,417) (actual time=25.099..33.343 rows=601 loops=1)

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

Hash Join (cost=425.16..612.68 rows=601 width=762) (actual time=23.940..31.256 rows=601 loops=1)

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

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

4. 2.864 19.791 ↑ 1.0 601 1

Hash (cost=417.65..417.65 rows=601 width=689) (actual time=19.790..19.791 rows=601 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 422kB
5. 6.238 16.927 ↑ 1.0 601 1

Hash Join (cost=328.05..417.65 rows=601 width=689) (actual time=10.183..16.927 rows=601 loops=1)

  • Hash Cond: (p_a.module_assignment_id = ma.id)
6. 2.735 2.735 ↑ 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.006..2.735 rows=3,606 loops=1)

7. 0.130 7.954 ↑ 1.0 70 1

Hash (cost=327.18..327.18 rows=70 width=657) (actual time=7.954..7.954 rows=70 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 54kB
8. 0.129 7.824 ↑ 1.0 70 1

Hash Join (cost=190.46..327.18 rows=70 width=657) (actual time=6.953..7.824 rows=70 loops=1)

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

Nested Loop (cost=183.88..320.41 rows=70 width=439) (actual time=6.631..7.387 rows=70 loops=1)

10. 0.521 6.983 ↑ 1.0 70 1

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

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

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

12. 0.086 6.094 ↑ 1.0 14 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
13. 0.077 6.008 ↑ 1.0 14 1

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

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

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

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

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

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

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

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

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

18. 0.056 0.107 ↑ 1.0 14 1

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

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

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

20. 0.210 0.210 ↑ 1.0 1 70

Index Scan using assignments_id_assignee_id_idx on assignments a2 (cost=0.28..1.75 rows=1 width=89) (actual time=0.003..0.003 rows=1 loops=70)

  • Index Cond: (id = ma.id)
21. 0.126 0.308 ↑ 1.0 70 1

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

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

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

23. 0.639 1.143 ↑ 1.0 700 1

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

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

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

Planning time : 4.607 ms