diff options
author | Julius Härtl <jus@bitgrid.net> | 2023-11-30 16:30:21 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2023-11-30 20:51:48 +0100 |
commit | 0ccf84bb3174a0dba47938888d104db96dcacb1b (patch) | |
tree | a4f19dd82611725e9409d3dfeb47dcd4b9dcf824 /core/Migrations | |
parent | 3cd1d74a815531c9b7ae25ebbf8e7c45fa566e74 (diff) | |
download | nextcloud-server-0ccf84bb3174a0dba47938888d104db96dcacb1b.tar.gz nextcloud-server-0ccf84bb3174a0dba47938888d104db96dcacb1b.zip |
perf: Add partial index on configvalue of preferences table
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'core/Migrations')
-rw-r--r-- | core/Migrations/Version13000Date20170718121200.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/Migrations/Version13000Date20170718121200.php b/core/Migrations/Version13000Date20170718121200.php index da83b0732d8..b4968e06397 100644 --- a/core/Migrations/Version13000Date20170718121200.php +++ b/core/Migrations/Version13000Date20170718121200.php @@ -31,6 +31,7 @@ */ namespace OC\Core\Migrations; +use Doctrine\DBAL\Platforms\OraclePlatform; use Doctrine\DBAL\Platforms\PostgreSQL94Platform; use OCP\DB\ISchemaWrapper; use OCP\DB\Types; @@ -332,6 +333,9 @@ class Version13000Date20170718121200 extends SimpleMigrationStep { ]); $table->setPrimaryKey(['userid', 'appid', 'configkey']); $table->addIndex(['appid', 'configkey'], 'preferences_app_key'); + if (!$this->connection->getDatabasePlatform() instanceof OraclePlatform) { + $table->addIndex(['configvalue'], 'preferences_configvalue', [], ['lengths' => [80]]); + } } if (!$schema->hasTable('properties')) { |