diff options
author | Julius Härtl <jus@bitgrid.net> | 2022-04-21 09:59:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-21 09:59:04 +0200 |
commit | f4135c72f505f13891e0b05e7e4f4d2d921462b0 (patch) | |
tree | d242ace298b2829c7eaa05430c05ee8c8f3f676d /lib | |
parent | 12ed5c9ff3e9dac25b43a1ad934a97a86037000b (diff) | |
parent | 7fbd93b2ad66a1ca83ef2a2778128bf2cda06caf (diff) | |
download | nextcloud-server-f4135c72f505f13891e0b05e7e4f4d2d921462b0.tar.gz nextcloud-server-f4135c72f505f13891e0b05e7e4f4d2d921462b0.zip |
Merge pull request #31047 from nextcloud/enh/preferences-index
Additional index on oc_preferences to make queries without a user filter faster
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/AllConfig.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/AllConfig.php b/lib/private/AllConfig.php index 36eb0bbf6d9..e5a6e6a5acd 100644 --- a/lib/private/AllConfig.php +++ b/lib/private/AllConfig.php @@ -497,6 +497,8 @@ class AllConfig implements \OCP\IConfig { $sql .= 'AND `configvalue` = ?'; } + $sql .= ' ORDER BY `userid`'; + $result = $this->connection->executeQuery($sql, [$appName, $key, $value]); $userIDs = []; @@ -534,6 +536,8 @@ class AllConfig implements \OCP\IConfig { $sql .= 'AND LOWER(`configvalue`) = ?'; } + $sql .= ' ORDER BY `userid`'; + $result = $this->connection->executeQuery($sql, [$appName, $key, strtolower($value)]); $userIDs = []; |