mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
perf(db): Extend index on cards_properties to cover name and value
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
parent
5741d587ff
commit
8388646ae7
2 changed files with 9 additions and 6 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Reference in a new issue