Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-77569

Custom reports are inefficient in requesting persistent element data (backport of MDL-76901)

XMLWordPrintable

    • MOODLE_400_STABLE, MOODLE_401_STABLE
    • MOODLE_401_STABLE
    • MDL-77569-401
    • Hide

      Copied from MDL-76901

      Automated (both Behat & PHPUnit) will test everything still works

      Manual test prerequisites

      1. MySQL (or the knowledge to enable query logging on another DB )
        • Root CLI access to database

      Manual test

      1. Log in to MySQL terminal as root user, issue the following commands:

        mysql> SET global log_output = 'FILE';
        Query OK, 0 rows affected (0.00 sec)
         
        mysql> SET global general_log_file='/tmp/mysql.log';
        Query OK, 0 rows affected (0.01 sec)
         
        mysql> SET global general_log = 1;
        Query OK, 0 rows affected (0.00 sec)
         
        mysql> quit
        Bye
        

      2. Tail the resulting log file:

        $ tail -f /tmp/mysql.log
        

      3. Log in to Moodle as admin
      4. Navigate to Reports from user menu
      5. Create new report from Users report source
        • Include default setup
      6. Examine the DB query log for the last page request
        • Confirm there is only one logged query matching FROM m_reportbuilder_column (down from ~10)
        • Confirm there are only two logged queries matching FROM m_reportbuilder_filter (down from ~7)
        • Note: replace m_ in table names with appropriate $CFG->prefix according to your own site
      Show
      Copied from MDL-76901 Automated (both Behat & PHPUnit) will test everything still works Manual test prerequisites MySQL (or the knowledge to enable query logging on another DB ) Root CLI access to database Manual test Log in to MySQL terminal as root user, issue the following commands: mysql> SET global log_output = 'FILE'; Query OK, 0 rows affected (0.00 sec)   mysql> SET global general_log_file='/tmp/mysql.log'; Query OK, 0 rows affected (0.01 sec)   mysql> SET global general_log = 1; Query OK, 0 rows affected (0.00 sec)   mysql> quit Bye Tail the resulting log file: $ tail -f /tmp/mysql.log Log in to Moodle as admin Navigate to Reports from user menu Create new report from Users report source Include default setup Examine the DB query log for the last page request Confirm there is only one logged query matching FROM m_reportbuilder_column (down from ~10) Confirm there are only two logged queries matching FROM m_reportbuilder_filter (down from ~7) Note: replace m_ in table names with appropriate $CFG->prefix according to your own site

      Request to backport MDL-76901 to supported branches (400, 401) for performance benefits

      As commented here the original issue was re-classified as an improvement, which we'd later request was backported

            pholden Paul Holden
            pholden Paul Holden
            Carlos Castillo Carlos Castillo
            Andrew Lyons Andrew Lyons
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 9 minutes
                2h 9m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.