explain.depesz.com

PostgreSQL's explain analyze made readable

Result: eJry

Settings
# exclusive inclusive rows x rows loops node
1. 0.237 457.556 ↑ 1.1 87 1

Sort (cost=46,613.40..46,613.65 rows=100 width=580) (actual time=457.546..457.556 rows=87 loops=1)

  • Sort Key: t.ord
  • Sort Method: quicksort Memory: 70kB
2. 0.295 457.319 ↑ 1.1 87 1

Nested Loop Left Join (cost=10,529.93..46,610.08 rows=100 width=580) (actual time=186.910..457.319 rows=87 loops=1)

3. 0.083 241.699 ↑ 1.1 87 1

Nested Loop (cost=10,529.12..46,324.08 rows=100 width=480) (actual time=186.810..241.699 rows=87 loops=1)

4. 0.605 223.868 ↑ 1.1 87 1

Hash Right Join (cost=10,528.57..46,066.58 rows=100 width=467) (actual time=186.727..223.868 rows=87 loops=1)

  • Hash Cond: (((sub.learner_xid)::text = (learner.person_xid)::text) AND ((sub.assignment_xid)::text = t.asnxid))
5. 98.356 220.861 ↑ 8.2 850 1

Nested Loop Left Join (cost=10,522.24..45,937.72 rows=7,001 width=2,118) (actual time=33.746..220.861 rows=850 loops=1)

6. 7.309 32.405 ↑ 8.2 850 1

Hash Right Join (cost=10,521.43..20,829.12 rows=7,001 width=646) (actual time=31.918..32.405 rows=850 loops=1)

  • Hash Cond: (((outc.section_xid)::text = (sub.section_xid)::text) AND ((outc.assignment_xid)::text = (sub.assignment_xid)::text) AND ((outc.assignment_attempt_xid)::text = (sub.assignment_attempt_xid)::text) AND ((outc.learner_xid)::text = (sub.learner_xid)::text))
7. 7.945 7.945 ↑ 1.0 10,119 1

Index Scan using idx_attempt_outcome_section_xid on attempt_outcome outc (cost=0.55..9,945.74 rows=10,357 width=521) (actual time=0.037..7.945 rows=10,119 loops=1)

  • Index Cond: ((section_xid)::text = 'urn:com.mheducation.openlearning:enterprise.roster:pqa.us-east-1:section:a307f3a0-7c2d-11e8-8844-237db4a244eb'::text)
8. 0.866 17.151 ↑ 8.2 850 1

Hash (cost=10,380.86..10,380.86 rows=7,001 width=801) (actual time=17.151..17.151 rows=850 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 629kB
9. 0.480 16.285 ↑ 8.2 850 1

Hash Left Join (cost=1,820.46..10,380.86 rows=7,001 width=801) (actual time=5.939..16.285 rows=850 loops=1)

  • Hash Cond: (((sub.section_xid)::text = (assn.section_xid)::text) AND ((sub.assignment_xid)::text = (assn.xid)::text))
10. 9.953 9.953 ↑ 8.2 850 1

Index Scan using idx_sub_x_scorable on submission_x sub (cost=0.68..8,508.27 rows=7,001 width=793) (actual time=0.069..9.953 rows=850 loops=1)

  • Index Cond: (('urn:com.mheducation.openlearning:enterprise.roster:pqa.us-east-1:section:a307f3a0-7c2d-11e8-8844-237db4a244eb'::text = (section_xid)::text) AND (is_deleted = false))
  • Filter: ((NOT is_deleted) AND is_affecting_grade)
11. 1.080 5.852 ↓ 1.1 1,954 1

Hash (cost=1,793.40..1,793.40 rows=1,758 width=258) (actual time=5.852..5.852 rows=1,954 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 581kB
12. 4.772 4.772 ↓ 1.1 1,954 1

Index Scan using idx_assignmentment_section on assignment assn (cost=0.55..1,793.40 rows=1,758 width=258) (actual time=0.039..4.772 rows=1,954 loops=1)

  • Index Cond: ((section_xid)::text = 'urn:com.mheducation.openlearning:enterprise.roster:pqa.us-east-1:section:a307f3a0-7c2d-11e8-8844-237db4a244eb'::text)
13. 90.100 90.100 ↑ 1.0 1 850

Index Scan using attempt_pkey on attempt atmp (cost=0.81..2.83 rows=1 width=372) (actual time=0.106..0.106 rows=1 loops=850)

  • Index Cond: (((assignment_xid)::text = (sub.assignment_xid)::text) AND ((learner_xid)::text = (sub.learner_xid)::text) AND (attempt_number = 1))
  • Filter: (((section_xid)::text = 'urn:com.mheducation.openlearning:enterprise.roster:pqa.us-east-1:section:a307f3a0-7c2d-11e8-8844-237db4a244eb'::text) AND ((section_xid)::text = (sub.section_xid)::text))
14. 0.034 2.402 ↑ 1.1 87 1

Hash (cost=4.83..4.83 rows=100 width=150) (actual time=2.402..2.402 rows=87 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 34kB
15. 0.017 2.368 ↑ 1.1 87 1

Nested Loop (cost=0.81..4.83 rows=100 width=150) (actual time=2.342..2.368 rows=87 loops=1)

16. 2.309 2.309 ↑ 1.0 1 1

Index Only Scan using learner_x_pkey on learner_x learner (cost=0.81..2.83 rows=1 width=110) (actual time=2.308..2.309 rows=1 loops=1)

  • Index Cond: ((person_xid = ANY ('{urn:com.mheducation.openlearning:enterprise.identity:pqa.us-east-1:person:82013b79-64ca-4aca-b32e-92ad1dcefdf5}'::text[])) AND (section_xid = 'urn:com.mheducation.openlearning:enterprise.roster:pqa.us-east-1:section:a307f3a0-7c2d-11e8-8844-237db4a244eb'::text))
  • Heap Fetches: 0
17. 0.042 0.042 ↑ 1.1 87 1

Function Scan on unnest t (cost=0.00..1.00 rows=100 width=40) (actual time=0.033..0.042 rows=87 loops=1)

18. 17.748 17.748 ↑ 1.0 1 87

Index Scan using assignment_pkey on assignment asn (cost=0.55..2.56 rows=1 width=154) (actual time=0.187..0.204 rows=1 loops=87)

  • Index Cond: ((xid)::text = t.asnxid)
  • Filter: is_affecting_grade
19. 215.325 215.325 ↑ 1.0 1 87

Index Scan using idx_learner_assignment_section on learner_assignment lasn (cost=0.81..2.83 rows=1 width=278) (actual time=2.445..2.475 rows=1 loops=87)

  • Index Cond: (('urn:com.mheducation.openlearning:enterprise.roster:pqa.us-east-1:section:a307f3a0-7c2d-11e8-8844-237db4a244eb'::text = (section_xid)::text) AND ((learner.person_xid)::text = (learner_xid)::text) AND (t.asnxid = (assignment_xid)::text) AND (is_deleted = false))
  • Filter: (NOT is_deleted)