mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-39725 database: Apply database statistics update to daily stats
This commit is contained in:
parent
8343b340c4
commit
cc67c6db61
@ -259,6 +259,7 @@ function stats_cron_daily($maxdays=1) {
|
||||
$failed = true;
|
||||
break;
|
||||
}
|
||||
$DB->update_temp_table_stats();
|
||||
|
||||
stats_progress('1');
|
||||
|
||||
@ -385,6 +386,10 @@ function stats_cron_daily($maxdays=1) {
|
||||
$failed = true;
|
||||
break;
|
||||
}
|
||||
// The steps up until this point, all add to {temp_stats_daily} and don't use new tables.
|
||||
// There is no point updating statistics as they won't be used until the DELETE below.
|
||||
$DB->update_temp_table_stats();
|
||||
|
||||
stats_progress('7');
|
||||
|
||||
// Default frontpage role enrolments are all site users (not deleted)
|
||||
@ -581,6 +586,7 @@ function stats_cron_daily($maxdays=1) {
|
||||
$failed = true;
|
||||
break;
|
||||
}
|
||||
$DB->update_temp_table_stats();
|
||||
stats_progress('15');
|
||||
|
||||
// How many view actions for guests or not-logged-in on frontpage
|
||||
@ -1736,6 +1742,9 @@ function stats_temp_table_fill($timestart, $timeend) {
|
||||
|
||||
$DB->execute($sql);
|
||||
|
||||
// We have just loaded all the temp tables, collect statistics for that.
|
||||
$DB->update_temp_table_stats();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user