mirror of
https://github.com/nextcloud/server.git
synced 2025-05-09 00:00:43 +00:00
Merge pull request #51438 from nextcloud/perf/db/cards-properties-abid-name-value-idx
perf(db): Extend index on cards_properties to cover name and value
This commit is contained in:
commit
cc5ca58816
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…
Add table
Add a link
Reference in a new issue