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
    • Rank:
      33457

      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.
      
      1. MDL-30643_pu.log
        25 kB
        Aparup Banerjee
      2. MDL-30643-TZ_phpunit.rtf
        67 kB
        Aparup Banerjee
      3. mssql_phpunit_output.txt
        49 kB
        Aparup Banerjee
      4. mssql_phpunit_output2.txt
        49 kB
        Michael de Raadt
      5. mssql_phpunit_output3.txt
        57 kB
        Michael de Raadt
      6. oracle_phpunit_output.txt
        49 kB
        Aparup Banerjee
      7. oracle_phpunit_output2.txt
        49 kB
        Michael de Raadt
      8. oracle_phpunit_output3.txt
        55 kB
        Michael de Raadt
      9. phpunit_MDL-30643_debug_n.txt
        54 kB
        Aparup Banerjee
      10. stats-v2.patch
        17 kB
        Tyler Bannister

        Issue Links

          Activity

            People

            • Votes:
              31 Vote for this issue
              Watchers:
              29 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: