Trim down the log database size

Re: Trim down the log database size

by Leon Stringer -
Number of replies: 0
Picture of Core developers Picture of Particularly helpful Moodlers

As Tim says the cron has to run to remove the rows from the log table.

However, the space isn't automatically recovered in the .ibd file.

You can run the MySQL statement OPTIMIZE TABLE mdl_logstore_standard_log to recover the space (assuming you have the mdl_ table prefix).

The log table will be locked during this operation so your site may be unresponsive whilst this runs (maybe a few minutes).

A database backup is recommended before any action such as this.