explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qYCf

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 0.038 ↑ 1.0 1 1

Aggregate (cost=1,515.29..1,515.30 rows=1 width=8) (actual time=0.038..0.038 rows=1 loops=1)

  • Output: count(*)
  • Buffers: shared hit=28
2. 0.000 0.037 ↓ 0.0 0 1

Unique (cost=1,514.96..1,515.20 rows=7 width=4) (actual time=0.037..0.037 rows=0 loops=1)

  • Output: trainings.id
  • Buffers: shared hit=28
3. 0.003 0.037 ↓ 0.0 0 1

Sort (cost=1,514.96..1,515.08 rows=49 width=4) (actual time=0.037..0.037 rows=0 loops=1)

  • Output: trainings.id
  • Sort Key: trainings.id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=28
4. 0.000 0.034 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.28..1,513.58 rows=49 width=4) (actual time=0.034..0.034 rows=0 loops=1)

  • Output: trainings.id
  • Join Filter: (workouts.id = trainings.workout_id)
  • Buffers: shared hit=28
5. 0.034 0.034 ↓ 0.0 0 1

Index Scan using index_trainings_on_user_id on public.trainings (cost=0.57..1,494.26 rows=7 width=12) (actual time=0.034..0.034 rows=0 loops=1)

  • Output: trainings.id, trainings.training_spot_id, trainings.workout_id
  • Index Cond: (trainings.user_id = 1234)
  • Filter: (trainings.workout_id = 1)
  • Rows Removed by Filter: 24
  • Buffers: shared hit=28
6. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.71..18.60 rows=7 width=4) (never executed)

  • Output: workouts.id
7. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=0.71..18.57 rows=7 width=4) (never executed)

  • Output: workouts.id
  • Join Filter: (exercise_workouts.workout_id = workouts.id)
8. 0.000 0.000 ↓ 0.0 0

Index Scan using workouts_pkey on public.workouts (cost=0.29..4.31 rows=1 width=4) (never executed)

  • Output: workouts.id
  • Index Cond: (workouts.id = 1)
  • Filter: (workouts.category <> ALL ('{1,2}'::integer[]))
9. 0.000 0.000 ↓ 0.0 0

Index Scan using index_ew_on_exercise_id_and_round_and_table_order on public.exercise_workouts (cost=0.42..14.17 rows=7 width=8) (never executed)

  • Output: exercise_workouts.id, exercise_workouts.exercise_id, exercise_workouts.workout_id, exercise_workouts.round, exercise_workouts.quantity_description, exercise_workouts.table_order, exercise_workouts.created_at, exercise_workouts.updated_at, exercise_workouts.quantity, exercise_workouts.termination_criteria, exercise_workouts.percent_one_rep_max, exercise_workouts.round_type, exercise_workouts.pace
  • Index Cond: (exercise_workouts.workout_id = 1)
Planning time : 0.363 ms
Execution time : 0.081 ms