-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
3.9.23, 4.1.5
-
MOODLE_39_STABLE, MOODLE_401_STABLE
This can take a long time to run for large datasets.
Be good to optimise SQL if possible or filter results to last 3 months on first load.
Facing this issue with large logstore_standard_log - approx 28,000,000 million rows. (indexed ~11,000,000 rows) Takes approx 8 minutes to load on a production server.
"SELECT contextinstanceid as cmid,
|
COUNT('x') AS numviews,
|
COUNT(DISTINCT userid) AS distinctusers ,
|
MAX(timecreated) AS lasttime
|
FROM {logstore_standard_log} l
|
WHERE courseid = :courseid
|
AND anonymous = 0
|
AND crud = 'r'
|
AND contextlevel = :contextmodule
|
GROUP BY contextinstanceid"
|
Initial load of the page uses all results and don't get option to filter by date until after page load.
Filtering the results to say the last 3 months on first page load will reduce load time, making it quicker for the user to then decide what they would like to filter if at all.
- has been marked as being related by
-
MDL-78968 Unlock the session in report_outline as it can take a long time
-
- Open
-