explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Ubpe

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.009 5.804 ↑ 1.0 2 1

Merge Join (cost=34.19..34.25 rows=2 width=129) (actual time=5.801..5.804 rows=2 loops=1)

2. 0.023 5.754 ↑ 1.0 2 1

Sort (cost=31.65..31.65 rows=2 width=148) (actual time=5.753..5.754 rows=2 loops=1)

  • Sort Key: sp.id
  • Sort Method: quicksort Memory: 25kB
3. 0.058 5.731 ↑ 1.0 2 1

Hash Join (cost=27.62..31.64 rows=2 width=148) (actual time=5.726..5.731 rows=2 loops=1)

4. 0.009 5.634 ↑ 22.9 7 1

Aggregate (cost=26.43..28.03 rows=160 width=45) (actual time=5.632..5.634 rows=7 loops=1)

5. 5.557 5.625 ↑ 12.3 13 1

Hash Join (cost=13.6..25.63 rows=160 width=41) (actual time=5.617..5.625 rows=13 loops=1)

6. 0.019 0.019 ↑ 8.0 20 1

Seq Scan on step_definitions sdc (cost=0..11.6 rows=160 width=8) (actual time=0.015..0.019 rows=20 loops=1)

7. 0.014 0.049 ↑ 8.0 20 1

Hash (cost=11.6..11.6 rows=160 width=37) (actual time=0.048..0.049 rows=20 loops=1)

8. 0.035 0.035 ↑ 8.0 20 1

Seq Scan on step_definitions sd (cost=0..11.6 rows=160 width=37) (actual time=0.029..0.035 rows=20 loops=1)

9. 0.006 0.039 ↑ 1.0 2 1

Hash (cost=1.16..1.16 rows=2 width=107) (actual time=0.039..0.039 rows=2 loops=1)

10. 0.033 0.033 ↑ 1.0 2 1

Seq Scan on step_participations sp (cost=0..1.16 rows=2 width=107) (actual time=0.032..0.033 rows=2 loops=1)

  • Filter: ((type)::text = 'StepParticipations::TodoParticipation'::text)
11. 0.007 0.041 ↑ 1.0 3 1

Sort (cost=2.54..2.55 rows=3 width=16) (actual time=0.04..0.041 rows=3 loops=1)

  • Sort Key: completed_child_per_participant.id
  • Sort Method: quicksort Memory: 25kB
12. 0.001 0.034 ↑ 1.0 3 1

Subquery Scan on completed_child_per_participant (cost=2.46..2.52 rows=3 width=16) (actual time=0.033..0.034 rows=3 loops=1)

13. 0.004 0.033 ↑ 1.0 3 1

Aggregate (cost=2.46..2.49 rows=3 width=16) (actual time=0.033..0.033 rows=3 loops=1)

14. 0.016 0.029 ↓ 1.7 5 1

Hash Join (cost=1.19..2.43 rows=3 width=12) (actual time=0.026..0.029 rows=5 loops=1)

15. 0.006 0.006 ↑ 1.0 13 1

Seq Scan on step_participations sp_1 (cost=0..1.13 rows=13 width=4) (actual time=0.004..0.006 rows=13 loops=1)

  • Filter: (deleted_at IS NULL)
16. 0.000 0.007 ↑ 1.0 5 1

Hash (cost=1.13..1.13 rows=5 width=12) (actual time=0.007..0.007 rows=5 loops=1)

17. 0.007 0.007 ↑ 1.0 5 1

Seq Scan on step_participations spc (cost=0..1.13 rows=5 width=12) (actual time=0.004..0.007 rows=5 loops=1)

  • Filter: ((completed_at IS NOT NULL) AND (deleted_at IS NULL) AND (participant_id IS NOT NULL))
Planning time : 0.666 ms
Execution time : 6.098 ms