explain.depesz.com

PostgreSQL's explain analyze made readable

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

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 1.986 10.394 ↑ 1.0 601 1

Hash Join (cost=243.47..334.65 rows=601 width=1,223) (actual time=5.591..10.394 rows=601 loops=1)

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

Hash Join (cost=205.72..295.31 rows=601 width=632) (actual time=3.704..6.552 rows=601 loops=1)

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

4. 0.095 2.285 ↑ 1.0 70 1

Hash (cost=204.85..204.85 rows=70 width=584) (actual time=2.285..2.285 rows=70 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 51kB
5. 0.141 2.190 ↑ 1.0 70 1

Hash Join (cost=190.18..204.85 rows=70 width=584) (actual time=1.777..2.190 rows=70 loops=1)

  • Hash Cond: (ma.module_id = m.id)
6. 0.276 1.947 ↑ 1.0 70 1

Hash Join (cost=183.60..198.08 rows=70 width=366) (actual time=1.666..1.947 rows=70 loops=1)

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

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

8. 0.017 1.494 ↑ 1.0 14 1

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

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

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

  • Hash Cond: (pa.program_id = p.id)
10. 0.361 1.428 ↑ 1.0 14 1

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

  • Hash Cond: (a.id = pa.id)
11. 0.966 0.966 ↑ 1.0 685 1

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

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

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

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
13. 0.035 0.035 ↑ 1.0 84 1

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

14. 0.013 0.026 ↑ 1.0 14 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
15. 0.013 0.013 ↑ 1.0 14 1

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

16. 0.057 0.102 ↑ 1.0 70 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 26kB
17. 0.045 0.045 ↑ 1.0 70 1

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

18. 0.935 1.856 ↑ 1.0 700 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 88kB
19. 0.921 0.921 ↑ 1.0 700 1

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

Planning time : 2.733 ms