From 1cfc8a2e0396d97345d3e46260de2b2ce8f17326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 6 Dec 2023 15:21:42 +0100 Subject: [PATCH] Revert "perf: Add partial index on configvalue of preferences table" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 0ccf84bb3174a0dba47938888d104db96dcacb1b. Signed-off-by: Julius Härtl --- core/Application.php | 11 ----------- core/Migrations/Version13000Date20170718121200.php | 4 ---- 2 files changed, 15 deletions(-) diff --git a/core/Application.php b/core/Application.php index b033ea70871cb..2ad8b9f2a3014 100644 --- a/core/Application.php +++ b/core/Application.php @@ -44,7 +44,6 @@ use OC\Authentication\Notifications\Notifier as AuthenticationNotifier; use OC\Core\Listener\BeforeTemplateRenderedListener; use OC\Core\Notification\CoreNotifier; -use OC\SystemConfig; use OC\TagManager; use OCP\AppFramework\App; use OCP\AppFramework\Http\Events\BeforeLoginTemplateRenderedEvent; @@ -82,7 +81,6 @@ public function __construct() { $notificationManager->registerNotifierService(AuthenticationNotifier::class); $eventDispatcher->addListener(AddMissingIndicesEvent::class, function (AddMissingIndicesEvent $event) { - $dbType = $this->getContainer()->get(SystemConfig::class)->getSystemValue('dbtype', 'sqlite'); $event->addMissingIndex( 'share', 'share_with_index', @@ -239,15 +237,6 @@ public function __construct() { ['appid', 'configkey'] ); - if ($dbType !== 'oci') { - $event->addMissingIndex( - 'preferences', - 'preferences_configvalue', - ['configvalue'], - ['lengths' => [80]] - ); - } - $event->addMissingIndex( 'mounts', 'mounts_class_index', diff --git a/core/Migrations/Version13000Date20170718121200.php b/core/Migrations/Version13000Date20170718121200.php index b4968e063972b..da83b0732d8a5 100644 --- a/core/Migrations/Version13000Date20170718121200.php +++ b/core/Migrations/Version13000Date20170718121200.php @@ -31,7 +31,6 @@ */ namespace OC\Core\Migrations; -use Doctrine\DBAL\Platforms\OraclePlatform; use Doctrine\DBAL\Platforms\PostgreSQL94Platform; use OCP\DB\ISchemaWrapper; use OCP\DB\Types; @@ -333,9 +332,6 @@ public function changeSchema(IOutput $output, \Closure $schemaClosure, array $op ]); $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')) {