diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2025-03-12 13:08:58 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2025-03-12 13:14:29 +0100 |
commit | 8388646ae77a5ae7b53e5ce20958f156c32f87c4 (patch) | |
tree | 67eb287340d149821c2fc524b30900869849f1e7 | |
parent | 5741d587ffd4430b68ae122d6023004d524147e3 (diff) | |
download | nextcloud-server-perf/db/cards-properties-abid-name-value-idx.tar.gz nextcloud-server-perf/db/cards-properties-abid-name-value-idx.zip |
perf(db): Extend index on cards_properties to cover name and valueperf/db/cards-properties-abid-name-value-idx
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
-rw-r--r-- | apps/dav/lib/Migration/Version1004Date20170924124212.php | 5 | ||||
-rw-r--r-- | core/Application.php | 10 |
2 files changed, 9 insertions, 6 deletions
diff --git a/apps/dav/lib/Migration/Version1004Date20170924124212.php b/apps/dav/lib/Migration/Version1004Date20170924124212.php index a8b85469214..fbfec7e8e2d 100644 --- a/apps/dav/lib/Migration/Version1004Date20170924124212.php +++ b/apps/dav/lib/Migration/Version1004Date20170924124212.php @@ -28,7 +28,10 @@ class Version1004Date20170924124212 extends SimpleMigrationStep { $table->addIndex(['addressbookid', 'uri'], 'cards_abiduri'); $table = $schema->getTable('cards_properties'); - $table->addIndex(['addressbookid'], 'cards_prop_abid'); + // Removed later on + // $table->addIndex(['addressbookid'], 'cards_prop_abid'); + // Added later on + $table->addIndex(['addressbookid', 'name', 'value'], 'cards_prop_abid_name_value', ); return $schema; } diff --git a/core/Application.php b/core/Application.php index cfd0f90ef24..9a759da544c 100644 --- a/core/Application.php +++ b/core/Application.php @@ -147,12 +147,12 @@ class Application extends App { true ); - $event->addMissingIndex( + $event->replaceIndex( 'cards_properties', - 'cards_prop_abid', - ['addressbookid'], - [], - true + ['cards_prop_abid'], + 'cards_prop_abid_name_value', + ['addressbookid', 'name', 'value'], + false, ); $event->addMissingIndex( |