My guess is that it might be because of the size of the mdl_log table, which has almost 5 million entries at the moment. I see that here, at moodle.org the log lifetime is set to as little as 1 month, so this might be an indication that I'm right in my guess. If the mdl_log size is really the issue here, is there any other way around than reducing the log lifetime? We'd like to keep logs for at least half a year.
Thanks in advance,
Przemek
The main reason for logs is for users (students, teachers, and system administrators) to monitor usage of of current courses. Hence, I have made it a practice, about a week into a new term, to delete entries from the log table for previous term. If one does not use terms (trimesters, semesters, etc), one can still have a stratagy for deleting old records. As truncating these records is not built into Moodle, it should be done from your database editing tool (I use SQLyog). I would make sure to backup your database and perhaps duplicate the log table before doing this in case you make a mistake or need the logs in the future for some sort of forensics.
After doing all this deleting, I would use your SQL tool to optimize your database to make everything small and fast again.
--Gary
OPTIMIZE TABLE
should be used if you have deleted a large part of a table..."
Also I have simulated the option to create indexes in mdl_log as if it was one mdl_log 1.7 but the improvement has been minimal
My second option is to spend(pass) postsandstone and to put in a RAID the table mdl_log.
More ideas or recommendations?