XMLWordPrintable

    Details

    • Database:
      MySQL
    • Testing Instructions:
      Hide

      Run daily statistics with major log entries for a day.

      With more than 150 000 entries, daily statistics generation can take 2 hours to resolve.

      Also run phpunit tests across 5 DB's

      Show
      Run daily statistics with major log entries for a day. With more than 150 000 entries, daily statistics generation can take 2 hours to resolve. Also run phpunit tests across 5 DB's
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull Master Branch:
      MDL-30643_master-log-speed

      Description

      Daily statistics generation is really slow because SQL queries are not optimized properly. The propblem occurs principaly when you have a lots of entries in the log table (150 000 and more per day). We also observed that the server is responding slowly for users in Moodle while the daily statistics generation is running (Every inserts in log table take about 40-50 seconds).

      December 5th cron log from our server

      Running daily statistics gathering, starting at 1322974800:
      ................  finished until 1323061200: lundi 5 décembre 2011, 00:00 (in 6872 s)
      ...completed 1 days of statistics.

        Attachments

        1. MDL-30643_pu.log
          25 kB
        2. MDL-30643-TZ_phpunit.rtf
          67 kB
        3. mssql_phpunit_output.txt
          49 kB
        4. mssql_phpunit_output2.txt
          49 kB
        5. mssql_phpunit_output3.txt
          57 kB
        6. oracle_phpunit_output.txt
          49 kB
        7. oracle_phpunit_output2.txt
          49 kB
        8. oracle_phpunit_output3.txt
          55 kB
        9. phpunit_MDL-30643_debug_n.txt
          54 kB
        10. stats-v2.patch
          17 kB

          Issue Links

            Activity

              People

              Assignee:
              tbannister Tyler Bannister
              Reporter:
              gaudreaj Jean-Philippe Gaudreau
              Integrator:
              Aparup Banerjee
              Tester:
              Michael de Raadt
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Matteo Scaramuccia, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              31 Vote for this issue
              Watchers:
              31 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                3/Dec/12