-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
1. to developAccepted and waiting to be taken care ofAccepted and waiting to be taken care ofbugperformance 🚀
Description
IConfig methods may issue queries which are causing a full table scan on oc_preferences with using the existing primary key as an index as it is only partially filtered for in the where clause, as the order seems to be relevant (userid,appid,configkey)
server/lib/private/AllConfig.php
Lines 485 to 490 in c92ac34
| public function getUsersForUserValue($appName, $key, $value) { | |
| // TODO - FIXME | |
| $this->fixDIInit(); | |
| $sql = 'SELECT `userid` FROM `*PREFIX*preferences` ' . | |
| 'WHERE `appid` = ? AND `configkey` = ? '; |
server/lib/private/AllConfig.php
Lines 387 to 392 in c92ac34
| public function deleteAppFromAllUsers($appName) { | |
| // TODO - FIXME | |
| $this->fixDIInit(); | |
| $sql = 'DELETE FROM `*PREFIX*preferences` '. | |
| 'WHERE `appid` = ?'; |
- Partial index after Always store and compare the email address as lower case #30197
CREATE INDEX prefix_configvalue_index on oc_preferences (configvalue(80));
Metadata
Metadata
Assignees
Labels
1. to developAccepted and waiting to be taken care ofAccepted and waiting to be taken care ofbugperformance 🚀