by Martín Langhoff.
Hi Sam,
I have an alternative approach that might work to relieve the pressure on mdl_log, while keeping things simple and JOINable.
My worry is that cost of replacing JOINs with get_logs_blah() for pervasive stuff (ie:recent activity block, stats) will be significant.
So my proposed approach is to log it to a file... then batch-INSERT it to mdl_log (from cron for instance). Batched INSERTs are a lot cheaper than an INSERT per row -- that holds true across all the RDBMSs Moodle supports these days.
This can be drafted and perf numbers obtained with relatively modest effort...
I have an alternative approach that might work to relieve the pressure on mdl_log, while keeping things simple and JOINable.
My worry is that cost of replacing JOINs with get_logs_blah() for pervasive stuff (ie:recent activity block, stats) will be significant.
So my proposed approach is to log it to a file... then batch-INSERT it to mdl_log (from cron for instance). Batched INSERTs are a lot cheaper than an INSERT per row -- that holds true across all the RDBMSs Moodle supports these days.
This can be drafted and perf numbers obtained with relatively modest effort...