-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.4.4
-
None
-
MOODLE_404_STABLE
When accessing the System Status report page on Moodle the SQL query that interrogates the standard log store table for the purposes of finding antivirus detections can take longer than 30 minutes to return data where there is a large data set in the logstore table
As a result the System Status page becomes frustratingly unusable
In very large mdl_logstore_standard_log tables, the SQL Query Optimizer does not use the indexes (likely due to the inner calculations that the optimizer performs), and instead performs a full table scan. This can take in excess of 30 minutes, depending on the number of rows. However, using the 'FORCE INDEX' statement (mdl_logsstanlog_tim_ix) on the query can return the same query in less than 20 seconds.
Can the query be rewritten to include the 'FORCE INDEX' directive in the SQL query?