explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lhL5 : Optimization for: Optimization for: plan #Ubpe; plan #Bs5n

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.020 0.798 ↑ 1.0 2 1

Sort (cost=34.08..34.08 rows=2 width=129) (actual time=0.798..0.798 rows=2 loops=1)

  • Sort Key: sp.id
  • Sort Method: quicksort Memory: 25kB
2. 0.006 0.778 ↑ 1.0 2 1

Nested Loop (cost=28.79..34.07 rows=2 width=129) (actual time=0.755..0.778 rows=2 loops=1)

3. 0.020 0.738 ↑ 1.0 2 1

Hash Join (cost=27.62..31.64 rows=2 width=156) (actual time=0.722..0.738 rows=2 loops=1)

4. 0.022 0.690 ↑ 22.9 7 1

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

5. 0.616 0.668 ↑ 12.3 13 1

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

6. 0.009 0.009 ↑ 8.0 20 1

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

7. 0.007 0.043 ↑ 8.0 20 1

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

8. 0.036 0.036 ↑ 8.0 20 1

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

9. 0.005 0.028 ↑ 1.0 2 1

Hash (cost=1.16..1.16 rows=2 width=115) (actual time=0.028..0.028 rows=2 loops=1)

10. 0.023 0.023 ↑ 1.0 2 1

Seq Scan on step_participations sp (cost=0..1.16 rows=2 width=115) (actual time=0.021..0.023 rows=2 loops=1)

  • Filter: ((type)::text = 'StepParticipations::TodoParticipation'::text)
11. 0.006 0.034 ↑ 1.0 1 2

Aggregate (cost=1.17..1.18 rows=1 width=16) (actual time=0.017..0.017 rows=1 loops=2)

12. 0.002 0.028 ↓ 2.0 2 2

Result (cost=0..1.16 rows=1 width=12) (actual time=0.013..0.014 rows=2 loops=2)

13. 0.026 0.026 ↓ 2.0 2 2

Seq Scan on step_participations spc (cost=0..1.16 rows=1 width=8) (actual time=0.012..0.013 rows=2 loops=2)

  • Filter: ((completed_at IS NOT NULL) AND (deleted_at IS NULL) AND (participant_id IS NOT NULL) AND (sp.id = activated_participation_id))
Planning time : 0.639 ms
Execution time : 0.976 ms