explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KTZrt

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

Aggregate (cost=58,738,082.05..58,738,082.06 rows=1 width=32) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Limit (cost=58,738,081.60..58,738,081.67 rows=30 width=54) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Sort (cost=58,738,081.60..58,739,726.05 rows=657,781 width=54) (actual rows= loops=)

  • Sort Key: people_profile.last_name, people_profile.first_name, learning_center_assignment.release_date
4. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=44.44..58,718,654.40 rows=657,781 width=54) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=27.22..39,409,204.68 rows=657,781 width=76) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=18.30..28,231,861.04 rows=657,781 width=48) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Seq Scan on learning_center_activity (cost=0.00..12,130.81 rows=657,781 width=12) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=18.30..42.88 rows=1 width=40) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=9.82..34.35 rows=1 width=84) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Index Scan using learning_center_assignment_pkey on learning_center_assignment (cost=0.43..8.45 rows=1 width=52) (actual rows= loops=)

  • Index Cond: (id = learning_center_activity.book_assignment_id)
11. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=9.39..25.89 rows=1 width=32) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=9.12..17.54 rows=1 width=152) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Merge Right Join (cost=8.83..9.23 rows=1 width=124) (actual rows= loops=)

  • Merge Cond: (learning_center_resourceattribute.id = learning_center_learningresource.text_type_id)
14. 0.000 0.000 ↓ 0.0

Index Scan using learning_center_resourceattribute_pkey on learning_center_resourceattribute (cost=0.14..18.16 rows=146 width=36) (actual rows= loops=)

15.          

SubPlan (for Index Scan)

16. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=32) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Sort (cost=8.31..8.32 rows=1 width=96) (actual rows= loops=)

  • Sort Key: learning_center_learningresource.text_type_id
18. 0.000 0.000 ↓ 0.0

Index Scan using learning_center_learningresource_pkey on learning_center_learningresource (cost=0.28..8.30 rows=1 width=96) (actual rows= loops=)

  • Index Cond: (id = learning_center_assignment.learning_resource_id)
19. 0.000 0.000 ↓ 0.0

Index Scan using learning_center_mediafile_pkey on learning_center_mediafile (cost=0.28..8.31 rows=1 width=36) (actual rows= loops=)

  • Index Cond: (id = learning_center_learningresource.thumbnail_id)
20.          

SubPlan (for Index Scan)

21. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=32) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Index Scan using catalog_topic_pkey on catalog_topic (cost=0.28..8.31 rows=1 width=36) (actual rows= loops=)

  • Index Cond: (id = learning_center_learningresource.topic_id)
23.          

SubPlan (for Index Scan)

24. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=32) (actual rows= loops=)

25.          

SubPlan (for Nested Loop Left Join)

26. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=32) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Aggregate (cost=8.48..8.49 rows=1 width=32) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Limit (cost=8.46..8.47 rows=1 width=40) (actual rows= loops=)

29. 0.000 0.000 ↓ 0.0

Sort (cost=8.46..8.47 rows=1 width=40) (actual rows= loops=)

  • Sort Key: learning_center_bookusage.updated_at DESC NULLS LAST
30. 0.000 0.000 ↓ 0.0

Index Scan using learning_center_bookusage_assignment_id_2480d1c0 on learning_center_bookusage (cost=0.42..8.46 rows=1 width=40) (actual rows= loops=)

  • Index Cond: (assignment_id = learning_center_assignment.id)
31.          

SubPlan (for Index Scan)

32. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=32) (actual rows= loops=)

33.          

SubPlan (for Nested Loop Left Join)

34. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=32) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=8.91..16.97 rows=1 width=32) (actual rows= loops=)

36. 0.000 0.000 ↓ 0.0

Index Scan using learning_center_assignment_pkey on learning_center_assignment learning_center_assignment_1 (cost=0.43..8.45 rows=1 width=10) (actual rows= loops=)

  • Index Cond: (id = learning_center_activity.quiz_assignment_id)
37. 0.000 0.000 ↓ 0.0

Aggregate (cost=8.48..8.49 rows=1 width=32) (actual rows= loops=)

38. 0.000 0.000 ↓ 0.0

Limit (cost=8.46..8.47 rows=1 width=40) (actual rows= loops=)

39. 0.000 0.000 ↓ 0.0

Sort (cost=8.46..8.47 rows=1 width=40) (actual rows= loops=)

  • Sort Key: usage_testtake.submitted_at DESC NULLS LAST
40. 0.000 0.000 ↓ 0.0

Index Scan using usage_testtake_assignment_id_6e678f2d on usage_testtake (cost=0.42..8.46 rows=1 width=40) (actual rows= loops=)

  • Index Cond: (assignment_id = learning_center_assignment_1.id)
41.          

SubPlan (for Index Scan)

42. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=32) (actual rows= loops=)

43.          

SubPlan (for Nested Loop Left Join)

44. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=32) (actual rows= loops=)

45. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=17.22..29.32 rows=1 width=46) (actual rows= loops=)

46. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.58..12.64 rows=1 width=50) (actual rows= loops=)

  • Join Filter: (people_student.user_id = people_profile.id)
47. 0.000 0.000 ↓ 0.0

Index Only Scan using people_student_pkey on people_student (cost=0.29..4.31 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (user_id = learning_center_activity.student_id)
48. 0.000 0.000 ↓ 0.0

Index Scan using people_profile_pkey on people_profile (cost=0.29..8.32 rows=1 width=50) (actual rows= loops=)

  • Index Cond: (id = learning_center_activity.student_id)
49.          

SubPlan (for Index Scan)

50. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=32) (actual rows= loops=)

51. 0.000 0.000 ↓ 0.0

Aggregate (cost=16.64..16.65 rows=1 width=32) (actual rows= loops=)

52. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.57..16.62 rows=1 width=36) (actual rows= loops=)

53. 0.000 0.000 ↓ 0.0

Index Scan using people_studentstudentgroupmembership_student_id_2d8dfb0e on people_studentstudentgroupmembership (cost=0.29..8.31 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (student_id = people_student.user_id)
54. 0.000 0.000 ↓ 0.0

Index Scan using people_studentgroup_pkey on people_studentgroup (cost=0.28..8.31 rows=1 width=36) (actual rows= loops=)

  • Index Cond: (id = people_studentstudentgroupmembership.student_group_id)
55.          

SubPlan (for Index Scan)

56. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=32) (actual rows= loops=)

57.          

SubPlan (for Aggregate)

58. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=32) (actual rows= loops=)

59.          

SubPlan (for Nested Loop Left Join)

60. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=32) (actual rows= loops=)

61.          

SubPlan (for Nested Loop Left Join)

62. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=32) (actual rows= loops=)