explain.depesz.com

PostgreSQL's explain analyze made readable

Result: TRGr

Settings
# exclusive inclusive rows x rows loops node
1. 0.840 39.508 ↓ 1,629.0 1,629 1

Sort (cost=44,289.49..44,289.50 rows=1 width=103) (actual time=39.405..39.508 rows=1,629 loops=1)

  • Sort Key: a.created_at DESC
  • Sort Method: quicksort Memory: 387kB
2. 0.982 38.668 ↓ 1,629.0 1,629 1

Nested Loop (cost=1.56..44,289.48 rows=1 width=103) (actual time=0.697..38.668 rows=1,629 loops=1)

3. 0.984 8.518 ↓ 29.6 7,292 1

Nested Loop (cost=1.14..44,181.54 rows=246 width=103) (actual time=0.288..8.518 rows=7,292 loops=1)

4. 0.966 0.966 ↓ 4.1 821 1

Index Scan using math_adaptive_assignment_sessions_student_id_completed_at_idx on math_adaptive_assignment_sessions s (cost=0.57..475.84 rows=200 width=4) (actual time=0.029..0.966 rows=821 loops=1)

  • Index Cond: (student_id = 13751337)
5. 6.568 6.568 ↑ 124.6 9 821

Index Scan using answers_assignment_session_id_idx on answers a (cost=0.57..207.32 rows=1,121 width=103) (actual time=0.005..0.008 rows=9 loops=821)

  • Index Cond: (assignment_session_id = s.id)
6. 29.168 29.168 ↓ 0.0 0 7,292

Index Scan using math_questions_pkey on math_questions q (cost=0.41..0.44 rows=1 width=13) (actual time=0.004..0.004 rows=0 loops=7,292)

  • Index Cond: ((id)::text = (a.math_question_id)::text)
  • Filter: ((skill_id)::text = ANY ('{xzskssrj,llcrjbyn,paovqhay,heogadvg,xpekuldo}'::text[]))
  • Rows Removed by Filter: 1
Planning time : 1.430 ms
Execution time : 39.618 ms