Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-35314

AssessmentGradeInfoProvider isAssignmentDefined results in many thousands database queries



    • 2.9 Status:
    • Previous Issue Keys:


      How to replicate: course with 10 students, 7 groups, 30 samigo assessments all sent to gradebook

      Go to Gradebook as admin user... load will take close to 1 minute

      Debugging reveals 49,000+ queries asking for AnswerFeedback info.......... IT seems clear that Hibernate eager loading is loading every single aspect when we are asking for simple info like isAssignmentDefined.

      Here is a query I saw executed 49,568 times while loading the Gradebook only (not going into Samigo at all):

      select publisheda0_.ANSWERFEEDBACKID as ANSWERFE1_243_3_, publisheda0_.ANSWERID as ANSWERID243_3_, publisheda0_.TYPEID as TYPEID243_3_, publisheda0_.TEXT as TEXT243_3_, publisheda1_.ANSWERID as ANSWERID242_0_, publisheda1_.ITEMTEXTID as ITEMTEXTID242_0_, publisheda1_.ITEMID as ITEMID242_0_, publisheda1_.TEXT as TEXT242_0_, publisheda1_.SEQUENCE as SEQUENCE242_0_, publisheda1_.LABEL as LABEL242_0_, publisheda1_.ISCORRECT as ISCORRECT242_0_, publisheda1_.GRADE as GRADE242_0_, publisheda1_.SCORE as SCORE242_0_, publisheda1_.PARTIAL_CREDIT as PARTIAL10_242_0_, publisheda1_.DISCOUNT as DISCOUNT242_0_, publishedi2_.ITEMTEXTID as ITEMTEXTID239_1_, publishedi2_.ITEMID as ITEMID239_1_, publishedi2_.SEQUENCE as SEQUENCE239_1_, publishedi2_.TEXT as TEXT239_1_, publishedi3_.ITEMID as ITEMID238_2_, publishedi3_.SECTIONID as SECTIONID238_2_, publishedi3_.ITEMIDSTRING as ITEMIDST3_238_2_, publishedi3_.SEQUENCE as SEQUENCE238_2_, publishedi3_.DURATION as DURATION238_2_, publishedi3_.TRIESALLOWED as TRIESALL6_238_2_, publishedi3_.INSTRUCTION as INSTRUCT7_238_2_, publishedi3_.DESCRIPTION as DESCRIPT8_238_2_, publishedi3_.TYPEID as TYPEID238_2_, publishedi3_.GRADE as GRADE238_2_, publishedi3_.SCORE as SCORE238_2_, publishedi3_.SCORE_DISPLAY_FLAG as SCORE12_238_2_, publishedi3_.MIN_SCORE as MIN13_238_2_, publishedi3_.DISCOUNT as DISCOUNT238_2_, publishedi3_.HINT as HINT238_2_, publishedi3_.HASRATIONALE as HASRATI16_238_2_, publishedi3_.PARTIAL_CREDIT_FLAG as PARTIAL17_238_2_, publishedi3_.STATUS as STATUS238_2_, publishedi3_.CREATEDBY as CREATEDBY238_2_, publishedi3_.CREATEDDATE as CREATED20_238_2_, publishedi3_.LASTMODIFIEDBY as LASTMOD21_238_2_, publishedi3_.LASTMODIFIEDDATE as LASTMOD22_238_2_ from SAM_PUBLISHEDANSWERFEEDBACK_T publisheda0_ inner join SAM_PUBLISHEDANSWER_T publisheda1_ on publisheda0_.ANSWERID=publisheda1_.ANSWERID left outer join SAM_PUBLISHEDITEMTEXT_T publishedi2_ on publisheda1_.ITEMTEXTID=publishedi2_.ITEMTEXTID left outer join SAM_PUBLISHEDITEM_T publishedi3_ on publisheda1_.ITEMID=publishedi3_.ITEMID where publisheda0_.ANSWERFEEDBACKID=? 92633 1 49568

        Gliffy Diagrams



              Issue Links



                  • Assignee:
                    samigoteam SAMIGO TEAM (Inactive)
                    ottenhoff Sam Ottenhoff
                  • Votes:
                    0 Vote for this issue
                    3 Start watching this issue


                    • Created:

                      Git Integration