Purge mdl_logstore_standard_log table

Purge mdl_logstore_standard_log table

by Giovanni Conte -
Number of replies: 3

Hi,

We are using the Moodle version 3.9.4, currently the mdl_logstore_standard_log holds data from January of 2016 until today. I wanted to know if it is safe to change "Keep logs for" from "Never delete logs" to "365" days in the Site administration > Plugins > Logging > Manage logstores for both Standard and Legacy log? Will this have an impact or affect the Moodle performance? 

Thank you,

Giovanni.

Average of ratings: -
In reply to Giovanni Conte

Re: Purge mdl_logstore_standard_log table

by Ken Task -
Picture of Particularly helpful Moodlers

Depending upon size of those related tables, at first, while moodle is removing records no longer needed, site might .. notice I said might ... act a little slower.

If you had mysqltuner installed right after that task has been completed, I'd run tuner.   You might see that tuner recommends that table could be optimized and you could re-claim some space if those tables were optimized.

Before doing that, good idea to make a DB dump.

'SoS', Ken

In reply to Giovanni Conte

Re: Purge mdl_logstore_standard_log table

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
In addition to what Ken has said, you should also think about your school's need for "course analytics." That mdl_logstore_standad_log table contains the "clicks" that students have done. So if you get rid of data in that table, you get rid of a lot of history.

If you do decide to change the setting, then I would suggest that you regularly export the contents of that table.