diff options
author | Robin Appelman <robin@icewind.nl> | 2020-09-22 15:15:34 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2020-09-22 15:15:34 +0200 |
commit | 634c051be6a4ec7d3b6b2b9c825ec484c9e76a22 (patch) | |
tree | 0fd02aff7f897198f88ad861cf8bb7826056899f /core/Command/Db/AddMissingIndices.php | |
parent | 48961823f716ef096c180980b6f9d0c7c22dace3 (diff) | |
download | nextcloud-server-634c051be6a4ec7d3b6b2b9c825ec484c9e76a22.tar.gz nextcloud-server-634c051be6a4ec7d3b6b2b9c825ec484c9e76a22.zip |
add size index for filecache
improves performance of #23004
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'core/Command/Db/AddMissingIndices.php')
-rw-r--r-- | core/Command/Db/AddMissingIndices.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/Command/Db/AddMissingIndices.php b/core/Command/Db/AddMissingIndices.php index c4d8f6d7e31..d06f27e8449 100644 --- a/core/Command/Db/AddMissingIndices.php +++ b/core/Command/Db/AddMissingIndices.php @@ -135,6 +135,13 @@ class AddMissingIndices extends Command { $updated = true; $output->writeln('<info>Filecache table updated successfully.</info>'); } + if (!$table->hasIndex('fs_size')) { + $output->writeln('<info>Adding additional size index to the filecache table, this can take some time...</info>'); + $table->addIndex(['size'], 'fs_size'); + $this->connection->migrateToSchema($schema->getWrappedSchema()); + $updated = true; + $output->writeln('<info>Filecache table updated successfully.</info>'); + } } $output->writeln('<info>Check indices of the twofactor_providers table.</info>'); |