Multiple queries as follows:
SELECT `id`, `uri`, `lastmodified`, `etag`, `size`, `carddata` FROM `oc_cards` WHERE (`addressbookid` = '380') AND (`uri` = 'LDAP:foo@bar.vcf') LIMIT 1;
generates high db load during searching for cards as we don't have any indexes.
CREATE INDEX addressbookid_uri_index on oc_cards ( addressbookid, uri );
was observed to cut database load in half in production.
Creating a PR...
Multiple queries as follows:
generates high db load during searching for cards as we don't have any indexes.
was observed to cut database load in half in production.
Creating a PR...