explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fB4r

Settings
# exclusive inclusive rows x rows loops node
1. 3.397 313.293 ↓ 7,266.0 7,266 1

Sort (cost=2,668.76..2,668.77 rows=1 width=103) (actual time=312.692..313.293 rows=7,266 loops=1)

  • Sort Key: a.created_at DESC
  • Sort Method: quicksort Memory: 1542kB
2. 1.382 309.896 ↓ 7,266.0 7,266 1

Nested Loop (cost=76.27..2,668.75 rows=1 width=103) (actual time=42.619..309.896 rows=7,266 loops=1)

3. 0.751 6.011 ↓ 135.2 811 1

Nested Loop (cost=1.14..2,193.84 rows=6 width=4) (actual time=0.030..6.011 rows=811 loops=1)

4. 1.155 1.155 ↓ 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=8) (actual time=0.014..1.155 rows=821 loops=1)

  • Index Cond: (student_id = 13751337)
5. 4.105 4.105 ↑ 1.0 1 821

Index Scan using math_adaptive_assignments_pkey on math_adaptive_assignments aa (cost=0.57..8.59 rows=1 width=4) (actual time=0.005..0.005 rows=1 loops=821)

  • Index Cond: (id = s.assignment_id)
  • Filter: ((domain_id)::text = 'xeqkuldz'::text)
  • Rows Removed by Filter: 0
6. 4.055 302.503 ↓ 9.0 9 811

Bitmap Heap Scan on answers a (cost=75.13..79.14 rows=1 width=103) (actual time=0.371..0.373 rows=9 loops=811)

  • Recheck Cond: ((assignment_session_id = s.id) AND (student_id = 13751337))
  • Heap Blocks: exact=971
7. 0.309 298.448 ↓ 0.0 0 811

BitmapAnd (cost=75.13..75.13 rows=1 width=0) (actual time=0.368..0.368 rows=0 loops=811)

8. 4.055 4.055 ↑ 124.6 9 811

Bitmap Index Scan on answers_assignment_session_id_idx (cost=0.00..24.98 rows=1,121 width=0) (actual time=0.005..0.005 rows=9 loops=811)

  • Index Cond: (assignment_session_id = s.id)
9. 294.084 294.084 ↓ 4.2 7,292 756

Bitmap Index Scan on answers_parent_student_id_created_at_idx (cost=0.00..49.47 rows=1,720 width=0) (actual time=0.389..0.389 rows=7,292 loops=756)

  • Index Cond: (student_id = 13751337)
Planning time : 1.275 ms
Execution time : 313.704 ms