Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index improvements on oc_preferences #30421

Closed
juliusknorr opened this issue Dec 28, 2021 · 0 comments · Fixed by #31047
Closed

Index improvements on oc_preferences #30421

juliusknorr opened this issue Dec 28, 2021 · 0 comments · Fixed by #31047
Labels
1. to develop Accepted and waiting to be taken care of bug performance 🚀

Comments

@juliusknorr
Copy link
Member

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)

public function getUsersForUserValue($appName, $key, $value) {
// TODO - FIXME
$this->fixDIInit();
$sql = 'SELECT `userid` FROM `*PREFIX*preferences` ' .
'WHERE `appid` = ? AND `configkey` = ? ';

public function deleteAppFromAllUsers($appName) {
// TODO - FIXME
$this->fixDIInit();
$sql = 'DELETE FROM `*PREFIX*preferences` '.
'WHERE `appid` = ?';

CREATE INDEX prefix_configvalue_index on oc_preferences (configvalue(80));
@juliusknorr juliusknorr added bug 0. Needs triage Pending check for reproducibility or if it fits our roadmap performance 🚀 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Dec 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of bug performance 🚀
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant