explain.depesz.com

PostgreSQL's explain analyze made readable

Result: W5QT

Settings
# exclusive inclusive rows x rows loops node
1. 33.781 418.225 ↓ 2.2 225 1

Nested Loop Left Join (cost=4.88..587.93 rows=100 width=580) (actual time=4.616..418.225 rows=225 loops=1)

  • Join Filter: (t.asnxid = (lasn.assignment_xid)::text)
  • Rows Removed by Join Filter: 273375
2. 0.022 23.319 ↓ 2.2 225 1

Nested Loop Left Join (cost=4.07..301.68 rows=100 width=589) (actual time=4.389..23.319 rows=225 loops=1)

  • Join Filter: (((learner.section_xid)::text = (sub.section_xid)::text) AND ((learner.person_xid)::text = (sub.learner_xid)::text) AND (t.asnxid = (sub.assignment_xid)::text))
3. 0.081 19.022 ↓ 2.2 225 1

Nested Loop (cost=1.36..288.07 rows=100 width=272) (actual time=0.191..19.022 rows=225 loops=1)

4. 0.054 1.391 ↓ 2.2 225 1

Nested Loop (cost=0.81..30.57 rows=100 width=259) (actual time=0.105..1.391 rows=225 loops=1)

5. 0.017 0.017 ↑ 6.7 15 1

Function Scan on unnest t (cost=0.00..1.00 rows=100 width=40) (actual time=0.010..0.017 rows=15 loops=1)

6. 0.053 1.320 ↓ 15.0 15 15

Materialize (cost=0.81..28.32 rows=1 width=219) (actual time=0.006..0.088 rows=15 loops=15)

7. 1.267 1.267 ↓ 15.0 15 1

Index Only Scan using learner_x_pkey on learner_x learner (cost=0.81..28.31 rows=1 width=219) (actual time=0.091..1.267 rows=15 loops=1)

  • Index Cond: ((person_xid = ANY ('{urn:com.mheducation.openlearning:enterprise.identity:pqa.us-east-1:person:97b564fd-704f-4a38-996e-3b1e6842a01a,urn:com.mheducation.openlearning:enterprise.identity:pqa.us-east-1:person:3697fd50-3b62-4766-a800-ce01034c80e4,urn:com.mheducation.openlearning:enterprise.identity:pqa.us-east-1:person:e0106c8d-6160-40e4-adae-8d6abdb63fa8,urn:com.mheducation.openlearning:enterprise.identity:pqa.us-east-1:person:00870495-068f-4fe4-999e-fe077505597b,urn:com.mheducation.openlearning:enterprise.identity:pqa.us-east-1:person:d6aa87e0-c741-47a7-871b-daa8e4087b5b,urn:com.mheducation.openlearning:enterprise.identity:pqa.us-east-1:person:0fe086a4-1df4-4c81-9339-4420eecf435f,urn:com.mheducation.openlearning:enterprise.identity:pqa.us-east-1:person:7e48f617-2cb6-4041-a536-4a26b4945695,urn:com.mheducation.openlearning:enterprise.identity:pqa.us-east-1:person:482e263f-320f-4056-86e1-4263e10aca3d,urn:com.mheducation.openlearning:enterprise.identity:pqa.us-east-1:person:62834c9b-2790-41cb-a851-8cd75d07dad8,urn:com.mheducation.openlearning:enterprise.identity:pqa.us-east-1:person:d80930e1-3aff-4be2-8961-44ecbdac919c,urn:com.mheducation.openlearning:enterprise.identity:pqa.us-east-1:person:39171757-8d6a-4c70-a468-43140c363edd,urn:com.mheducation.openlearning:enterprise.identity:pqa.us-east-1:person:5b4076b4-1037-473f-992b-62bc9a6945a0,urn:com.mheducation.openlearning:enterprise.identity:pqa.us-east-1:person:94bff775-5d8a-4519-bb2a-8e6500387e9f,urn:com.mheducation.openlearning:enterprise.identity:pqa.us-east-1:person:4e425085-224c-4af9-85e5-d5b9dd3e6263,urn:com.mheducation.openlearning:enterprise.identity:pqa.us-east-1:person:714701eb-8199-4f4e-8e84-77a2bb4108bc}'::text[])) AND (section_xid = 'urn:com.mheducation.openlearning:enterprise.roster:pqa.us-east-1:section:b170b1a0-7c2f-11e8-a353-dfc8d4d6cf9e'::text))
  • Heap Fetches: 0
8. 17.550 17.550 ↑ 1.0 1 225

Index Scan using assignment_pkey on assignment asn (cost=0.55..2.56 rows=1 width=154) (actual time=0.077..0.078 rows=1 loops=225)

  • Index Cond: ((xid)::text = t.asnxid)
  • Filter: is_affecting_grade
9. 0.081 4.275 ↓ 0.0 0 225

Materialize (cost=2.71..11.62 rows=1 width=676) (actual time=0.019..0.019 rows=0 loops=225)

10. 0.001 4.194 ↓ 0.0 0 1

Subquery Scan on sub (cost=2.71..11.61 rows=1 width=676) (actual time=4.194..4.194 rows=0 loops=1)

11. 0.000 4.193 ↓ 0.0 0 1

Nested Loop Left Join (cost=2.71..11.60 rows=1 width=1,711) (actual time=4.193..4.193 rows=0 loops=1)

  • Join Filter: (((assn.xid)::text = (sub_1.assignment_xid)::text) AND ((assn.section_xid)::text = (sub_1.section_xid)::text))
12. 0.000 4.193 ↓ 0.0 0 1

Nested Loop Left Join (cost=2.17..8.27 rows=1 width=647) (actual time=4.193..4.193 rows=0 loops=1)

13. 0.000 4.193 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.49..5.55 rows=1 width=802) (actual time=4.193..4.193 rows=0 loops=1)

14. 4.193 4.193 ↓ 0.0 0 1

Index Scan using idx_sub_x_sec_assign on submission_x sub_1 (cost=0.81..2.83 rows=1 width=793) (actual time=4.193..4.193 rows=0 loops=1)

  • Index Cond: (((section_xid)::text = 'urn:com.mheducation.openlearning:enterprise.roster:pqa.us-east-1:section:b170b1a0-7c2f-11e8-a353-dfc8d4d6cf9e'::text) AND ((assignment_xid)::text = 'urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:40f0e2a7-ecbd-1eb9-a51d-df9c9ff061eb,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:43799e2f-3f04-da31-bc73-f84a5f309001,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:4402d477-70ff-2ad7-869d-c8cb51d9bd26,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:444ba89d-a003-b9a2-b47d-536a44537fcc,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:4517bc63-5b46-5760-a626-a81e4457fbbd,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:452eb36e-d774-cbf3-9045-6b3f34a93a78,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:458a86a3-e629-4b21-a6ed-e83bbeb4cccc,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:45d03759-126f-26e0-8db3-e0e7ee30ea90,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:4802bf05-a381-073a-ac26-f3a7fe729290,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:4851eb63-e4f7-2d65-a1eb-31f337cc2b02,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:4871e314-55ab-72b0-bfce-c9021cf3d0a9,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:48a80bef-0e92-6a44-8294-72d659fe42f2,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:48d432bf-0eb8-fc19-ac2b-5cb922a36e6c,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:49071608-b124-d973-8912-86de0808c589,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:4938093a-5322-27a1-9b99-6f7f38c286db'::text) AND (is_deleted = false))
  • Filter: ((NOT is_deleted) AND is_affecting_grade)
15. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_attempt_sec_learner_isdel on attempt atmp (cost=0.68..2.71 rows=1 width=372) (never executed)

  • Index Cond: (((section_xid)::text = (sub_1.section_xid)::text) AND ((section_xid)::text = 'urn:com.mheducation.openlearning:enterprise.roster:pqa.us-east-1:section:b170b1a0-7c2f-11e8-a353-dfc8d4d6cf9e'::text) AND ((learner_xid)::text = (sub_1.learner_xid)::text))
  • Filter: (((assignment_xid)::text = 'urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:40f0e2a7-ecbd-1eb9-a51d-df9c9ff061eb,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:43799e2f-3f04-da31-bc73-f84a5f309001,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:4402d477-70ff-2ad7-869d-c8cb51d9bd26,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:444ba89d-a003-b9a2-b47d-536a44537fcc,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:4517bc63-5b46-5760-a626-a81e4457fbbd,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:452eb36e-d774-cbf3-9045-6b3f34a93a78,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:458a86a3-e629-4b21-a6ed-e83bbeb4cccc,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:45d03759-126f-26e0-8db3-e0e7ee30ea90,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:4802bf05-a381-073a-ac26-f3a7fe729290,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:4851eb63-e4f7-2d65-a1eb-31f337cc2b02,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:4871e314-55ab-72b0-bfce-c9021cf3d0a9,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:48a80bef-0e92-6a44-8294-72d659fe42f2,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:48d432bf-0eb8-fc19-ac2b-5cb922a36e6c,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:49071608-b124-d973-8912-86de0808c589,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:4938093a-5322-27a1-9b99-6f7f38c286db'::text) AND (attempt_number = 1) AND ((assignment_xid)::text = (sub_1.assignment_xid)::text))
16. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_attempt_outcome_assignment_attempt_xid on attempt_outcome outc (cost=0.68..2.71 rows=1 width=521) (never executed)

  • Index Cond: ((assignment_attempt_xid)::text = (sub_1.assignment_attempt_xid)::text)
  • Filter: (((section_xid)::text = 'urn:com.mheducation.openlearning:enterprise.roster:pqa.us-east-1:section:b170b1a0-7c2f-11e8-a353-dfc8d4d6cf9e'::text) AND ((assignment_xid)::text = 'urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:40f0e2a7-ecbd-1eb9-a51d-df9c9ff061eb,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:43799e2f-3f04-da31-bc73-f84a5f309001,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:4402d477-70ff-2ad7-869d-c8cb51d9bd26,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:444ba89d-a003-b9a2-b47d-536a44537fcc,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:4517bc63-5b46-5760-a626-a81e4457fbbd,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:452eb36e-d774-cbf3-9045-6b3f34a93a78,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:458a86a3-e629-4b21-a6ed-e83bbeb4cccc,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:45d03759-126f-26e0-8db3-e0e7ee30ea90,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:4802bf05-a381-073a-ac26-f3a7fe729290,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:4851eb63-e4f7-2d65-a1eb-31f337cc2b02,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:4871e314-55ab-72b0-bfce-c9021cf3d0a9,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:48a80bef-0e92-6a44-8294-72d659fe42f2,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:48d432bf-0eb8-fc19-ac2b-5cb922a36e6c,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:49071608-b124-d973-8912-86de0808c589,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:4938093a-5322-27a1-9b99-6f7f38c286db'::text) AND ((section_xid)::text = (sub_1.section_xid)::text) AND ((assignment_xid)::text = (sub_1.assignment_xid)::text) AND ((learner_xid)::text = (sub_1.learner_xid)::text))
17. 0.000 0.000 ↓ 0.0 0

Index Scan using assignment_pkey on assignment assn (cost=0.55..2.57 rows=1 width=258) (never executed)

  • Index Cond: ((xid)::text = 'urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:40f0e2a7-ecbd-1eb9-a51d-df9c9ff061eb,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:43799e2f-3f04-da31-bc73-f84a5f309001,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:4402d477-70ff-2ad7-869d-c8cb51d9bd26,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:444ba89d-a003-b9a2-b47d-536a44537fcc,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:4517bc63-5b46-5760-a626-a81e4457fbbd,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:452eb36e-d774-cbf3-9045-6b3f34a93a78,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:458a86a3-e629-4b21-a6ed-e83bbeb4cccc,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:45d03759-126f-26e0-8db3-e0e7ee30ea90,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:4802bf05-a381-073a-ac26-f3a7fe729290,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:4851eb63-e4f7-2d65-a1eb-31f337cc2b02,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:4871e314-55ab-72b0-bfce-c9021cf3d0a9,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:48a80bef-0e92-6a44-8294-72d659fe42f2,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:48d432bf-0eb8-fc19-ac2b-5cb922a36e6c,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:49071608-b124-d973-8912-86de0808c589,urn:com.mheducation.openlearning:lms.assignment:pqa.us-east-1.com.mheducation.connect2-pqa:assignment:4938093a-5322-27a1-9b99-6f7f38c286db'::text)
  • Filter: ((section_xid)::text = 'urn:com.mheducation.openlearning:enterprise.roster:pqa.us-east-1:section:b170b1a0-7c2f-11e8-a353-dfc8d4d6cf9e'::text)
18. 361.125 361.125 ↓ 1,216.0 1,216 225

Index Scan using idx_learner_assignment_section on learner_assignment lasn (cost=0.81..2.83 rows=1 width=387) (actual time=0.055..1.605 rows=1,216 loops=225)

  • Index Cond: (((learner.section_xid)::text = (section_xid)::text) AND ((section_xid)::text = 'urn:com.mheducation.openlearning:enterprise.roster:pqa.us-east-1:section:b170b1a0-7c2f-11e8-a353-dfc8d4d6cf9e'::text) AND ((learner.person_xid)::text = (learner_xid)::text) AND (is_deleted = false))
  • Filter: (NOT is_deleted)