explain.depesz.com

PostgreSQL's explain analyze made readable

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

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.925 13.983 ↑ 1.0 601 1

Hash Join (cost=431.69..620.80 rows=601 width=1,417) (actual time=9.011..13.983 rows=601 loops=1)

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

Hash Join (cost=393.94..581.46 rows=601 width=762) (actual time=8.239..12.295 rows=601 loops=1)

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

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

4. 0.749 6.954 ↑ 1.0 601 1

Hash (cost=386.43..386.43 rows=601 width=689) (actual time=6.954..6.954 rows=601 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 422kB
5. 2.318 6.205 ↑ 1.0 601 1

Hash Join (cost=296.83..386.43 rows=601 width=689) (actual time=3.492..6.205 rows=601 loops=1)

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

7. 0.165 2.318 ↑ 1.0 70 1

Hash (cost=295.96..295.96 rows=70 width=657) (actual time=2.318..2.318 rows=70 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 54kB
8. 0.117 2.153 ↑ 1.0 70 1

Hash Join (cost=165.24..295.96 rows=70 width=657) (actual time=1.382..2.153 rows=70 loops=1)

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

Nested Loop (cost=158.66..289.19 rows=70 width=439) (actual time=1.258..1.922 rows=70 loops=1)

10. 0.313 1.549 ↑ 1.0 70 1

Hash Join (cost=158.38..172.85 rows=70 width=350) (actual time=1.241..1.549 rows=70 loops=1)

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

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

12. 0.017 1.041 ↑ 1.0 14 1

Hash (cost=158.20..158.20 rows=14 width=318) (actual time=1.040..1.041 rows=14 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
13. 0.021 1.024 ↑ 1.0 14 1

Hash Join (cost=22.80..158.20 rows=14 width=318) (actual time=0.949..1.024 rows=14 loops=1)

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

Hash Join (cost=21.48..156.84 rows=14 width=121) (actual time=0.919..0.980 rows=14 loops=1)

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

Bitmap Heap Scan on assignments a (cost=17.59..151.15 rows=685 width=89) (actual time=0.051..0.529 rows=685 loops=1)

  • Recheck Cond: (assignee_id = '6789fb1d-0f4f-49bd-a5cf-33d915dba71c'::uuid)
  • Heap Blocks: exact=15
16. 0.037 0.037 ↑ 1.0 685 1

Bitmap Index Scan on assignments_assignee_id_idx (cost=0.00..17.42 rows=685 width=0) (actual time=0.036..0.037 rows=685 loops=1)

  • Index Cond: (assignee_id = '6789fb1d-0f4f-49bd-a5cf-33d915dba71c'::uuid)
17. 0.040 0.088 ↑ 1.0 84 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
18. 0.048 0.048 ↑ 1.0 84 1

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

19. 0.013 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
20. 0.010 0.010 ↑ 1.0 14 1

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

21. 0.210 0.210 ↑ 1.0 1 70

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

  • Index Cond: (id = ma.id)
22. 0.044 0.114 ↑ 1.0 70 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 26kB
23. 0.070 0.070 ↑ 1.0 70 1

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

24. 0.379 0.763 ↑ 1.0 700 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 84kB
25. 0.384 0.384 ↑ 1.0 700 1

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

Planning time : 2.139 ms