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

Implement cleanup of analytics_indicator_calc stores table

    XMLWordPrintable

Details

    • MOODLE_38_STABLE
    • MOODLE_311_STABLE
    • Hide
      1. Set the new "analytics/calclifetime" admin setting (Analytics > Analytics settings) to 35 days (default).
      2. Check the number of records in your analytics_indicator_calc table and make sure there are some that have a timecreated older than 35 days.
        • If you don't have records that are older than 35 days then update some of the records so that they are.
      3. Run the cleanup task.

        php admin/cli/scheduled_task.php --execute='\core\task\analytics_cleanup_task'
        

      4. Verify it ends without error.
      5. Check the analytics_indicator_calc table and make sure records older than 35 days have been removed.
      Show
      Set the new "analytics/calclifetime" admin setting (Analytics > Analytics settings) to 35 days (default). Check the number of records in your analytics_indicator_calc table and make sure there are some that have a timecreated older than 35 days. If you don't have records that are older than 35 days then update some of the records so that they are. Run the cleanup task. php admin/cli/scheduled_task.php --execute='\core\task\analytics_cleanup_task' Verify it ends without error. Check the analytics_indicator_calc table and make sure records older than 35 days have been removed.

    Description

      Would it be possible to implement automated cleanup of the mdl_analytics_indicator_calc table?  This would be useful prevent table from becoming too large.  For example, in one Moodle site with a 65 GB database, the table is currently 25 GB in size.

      Attachments

        Activity

          People

            danmarsden Dan Marsden
            thomas-its Thomas College ITS
            Paul Holden Paul Holden
            Adrian Greeve Adrian Greeve
            Mathew May Mathew May
            David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              17/May/21

              Time Tracking

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