|
Instead of a short log table, and a archive log table, why not do a table with only non-View actions. Most of the actions are view actions, that are not needed for the recent activity block.
I am talking without reading the referred talk about this problem, since I don't know its location. Even with a short log table, we are having about 200.000 page views per day, and even only one week means a short log table of about 1 million rows, that could not work very well if this block is on all courses, and used in each page view. I don't know the number of non-View operations per day, but the number of forum messages are per day is only 3.000, so probably the non-view actions are at most 5.000 per day, I guess. The cron could update this table of non-view actions, keeping all the rest of the code without any change, and its records expire at the same time the records in the log table expires. Since latest versions of moodle do use mysql 5.1.x or newer, why dont we use mysql partitioning since it is already supported in mysql 5.1 and newer?
it will serve better and effecient, especially for mdl_log because it grows massively everyday. we can simply partition mdl_log by id range.. ie: adding number of partitions according to the number of records our systems can handle effeciently. simply by adding there lins to the mdl_log creation: |
||||||||||||||||||||||||||||||||||||||||||||||||||
There was also talk about (or was I sleeping again?) splitting the log table in two, having a smaller "cache" table for the recent activity block and similar "short term history" actions, and then a bigger table for the longer history reports. Maybe the stats cron could move the tail of this recent activity table to the archive log table?
Has anything like this been discussed lately?