MDL-39725 database: Apply database statistics update to daily stats

This commit is contained in:
Russell Smith 2013-06-30 20:51:07 +10:00
parent 8343b340c4
commit cc67c6db61

View File

@ -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;
}