explain.depesz.com

PostgreSQL's explain analyze made readable

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

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 1.755 25.370 ↑ 1.0 601 1

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

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

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

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

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

4. 1.033 9.265 ↑ 1.0 601 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 422kB
5. 4.026 8.232 ↑ 1.0 601 1

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

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

7. 0.084 1.907 ↑ 1.0 70 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 54kB
8. 0.092 1.823 ↑ 1.0 70 1

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

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

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

10. 0.253 1.377 ↑ 1.0 70 1

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

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

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

12. 0.018 0.951 ↑ 1.0 14 1

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

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

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

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

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

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

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

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

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

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

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

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

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

19. 0.012 0.023 ↑ 1.0 14 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
20. 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)

21. 0.140 0.140 ↑ 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.002..0.002 rows=1 loops=70)

  • Index Cond: (id = ma.id)
22. 0.050 0.109 ↑ 1.0 70 1

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

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

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

24. 0.433 0.859 ↑ 1.0 700 1

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

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

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

Planning time : 3.405 ms