Skip to content

Commit

Permalink
MDL-75907 core: Add index on temp table to optimise stats cron
Browse files Browse the repository at this point in the history
  • Loading branch information
golenkovm committed Oct 7, 2022
1 parent 24f97ed commit 84eef00
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/statslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1632,6 +1632,7 @@ function stats_temp_table_create() {
$table->add_index('userid', XMLDB_INDEX_NOTUNIQUE, array('userid'));
$table->add_index('courseid', XMLDB_INDEX_NOTUNIQUE, array('courseid'));
$table->add_index('roleid', XMLDB_INDEX_NOTUNIQUE, array('roleid'));
$table->add_index('useridroleidcourseid', XMLDB_INDEX_NOTUNIQUE, array('userid', 'roleid', 'courseid'));
$tables['temp_enroled'] = $table;


Expand Down

0 comments on commit 84eef00

Please sign in to comment.