diff --git lib/db/upgrade.php lib/db/upgrade.php index f3a34290..73dd6126 100644 --- lib/db/upgrade.php +++ lib/db/upgrade.php @@ -2728,6 +2728,19 @@ privatefiles,moodle|/user/files.php'; $dbman->add_index($table, $index); } + //Additional Indexes for Performance Improvement + $index = new xmldb_index('component-area', XMLDB_INDEX_NOTUNIQUE, ['component', 'questionarea']); + // Conditionally launch add field id. + if (!$dbman->index_exists($table, $index)) { + $dbman->add_index($table, $index); + } + + $index = new xmldb_index('itemid', XMLDB_INDEX_UNIQUE, ['itemid']); + // Conditionally launch add field id. + if (!$dbman->index_exists($table, $index)) { + $dbman->add_index($table, $index); + } + // Main savepoint reached. upgrade_main_savepoint(true, 2022032200.01); }