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

findReadMessagesForStudent does not need to order in sql as it does it in code

    XMLWordPrintable

    Details

    • Type: (Deprecated) Contributed Patch
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.9.0
    • Fix Version/s: 2.9.2, 10.0
    • Component/s: Forums Tool
    • Labels:
      None
    • Environment:
      Mysql 5.1
    • Previous Issue Keys:
      MSGCNTR-791

      Description

      MSGCNTR-403 added forum statistics and grading

      Occasionally, we see slow queries in MySQL because a bad query plan is chosen. MySQL uses the primary index instead of the much better secondary index. One possible reason is that the ORDER BY clauses in findReadMessagesForStudent causes query plan confusion.

      The order by is completely unnecessary as the sorting is already done in Java code (messageforums-app/src/java/org/sakaiproject/tool/messageforums/ui/MessageForumStatisticsBean.java):

      sortStatisticsByUser2(statistics);

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

                Activity

                  People

                  Assignee:
                  baholladay Bryan Holladay
                  Reporter:
                  ottenhoff Sam Ottenhoff
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                    Dates

                    Created:
                    Updated:
                    Resolved:

                      Git Integration