explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ygvd

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Hash Semi Join (cost=9,171.59..5,723,331.26 rows=39 width=24) (actual rows= loops=)

  • Hash Cond: ((tr.sid)::text = (rp.sid)::text)
2. 0.000 0.000 ↓ 0.0

Merge Join (cost=9,118.48..5,722,997.95 rows=106,577 width=24) (actual rows= loops=)

  • Merge Cond: (t.id = ta.test_id)
3. 0.000 0.000 ↓ 0.0

Index Only Scan using test_pkey on test t (cost=0.41..2,010.13 rows=59,581 width=16) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Materialize (cost=9,118.06..5,748,225.37 rows=106,577 width=40) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=9,118.06..5,747,958.93 rows=106,577 width=40) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=9,117.64..5,699,388.59 rows=106,577 width=50) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Index Only Scan using test_administration_test_id on test_administration ta (cost=0.41..4.43 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = 'bd718f6e-c34d-11e8-a5d3-1bcd3e9ed89d'::uuid)
8. 0.000 0.000 ↓ 0.0

Hash Join (cost=9,117.22..5,698,318.39 rows=106,577 width=50) (actual rows= loops=)

  • Hash Cond: (r.test_registration_id = tr.id)
9. 0.000 0.000 ↓ 0.0

Seq Scan on test_registration_result r (cost=0.00..4,888,721.47 rows=213,177,047 width=41) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Hash (cost=9,084.50..9,084.50 rows=2,618 width=41) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on test_registration tr (cost=76.72..9,084.50 rows=2,618 width=41) (actual rows= loops=)

  • Recheck Cond: (test_administration_id = 'bd718f6e-c34d-11e8-a5d3-1bcd3e9ed89d'::uuid)
12. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on test_registration_test_administration_id (cost=0.00..76.07 rows=2,618 width=0) (actual rows= loops=)

  • Index Cond: (test_administration_id = 'bd718f6e-c34d-11e8-a5d3-1bcd3e9ed89d'::uuid)
13. 0.000 0.000 ↓ 0.0

Index Scan using question_pkey on question q (cost=0.43..0.45 rows=1 width=22) (actual rows= loops=)

  • Index Cond: (id = r.question_id)
14. 0.000 0.000 ↓ 0.0

Hash (cost=53.10..53.10 rows=1 width=27) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.68..53.10 rows=1 width=27) (actual rows= loops=)

  • Join Filter: ((rp.sid)::text = (s.sid)::text)
16. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.39..52.74 rows=1 width=18) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.83..50.65 rows=1 width=9) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Index Scan using courses_pkey on courses_full (cost=0.42..25.29 rows=3 width=33) (actual rows= loops=)

  • Index Cond: (id = ANY ('{3625fab0-8d8e-4221-a84e-0eeeb602d192,03611314-3602-4d35-99ba-b6ee25a910ab,07b01ea5-bddf-4d70-bd8e-58c611ab0a9c}'::uuid[]))
19. 0.000 0.000 ↓ 0.0

Index Scan using schedule_teacher_section on schedule c (cost=0.42..8.44 rows=1 width=43) (actual rows= loops=)

  • Index Cond: ((course_number = courses_full.course_number) AND (section = courses_full.section) AND (teacher_number = courses_full.teacher_number))
  • Filter: (courses_full.course_name = course_name)
20. 0.000 0.000 ↓ 0.0

Index Only Scan using test_registration_sid_test_administration_id_key on test_registration rp (cost=0.56..2.08 rows=1 width=9) (actual rows= loops=)

  • Index Cond: ((sid = (c.sid)::text) AND (test_administration_id = 'bd718f6e-c34d-11e8-a5d3-1bcd3e9ed89d'::uuid))
21. 0.000 0.000 ↓ 0.0

Index Scan using students_sid_ix on students s (cost=0.29..0.35 rows=1 width=9) (actual rows= loops=)

  • Index Cond: ((sid)::text = (c.sid)::text)
  • Filter: (("Gender" = 'M'::text) OR ("Gender" = 'm'::text))