nextcloud-server/core/Command/Db
Robin Appelman 6502dfae34
add better index for finding unindexed paths
for the following query 'SELECT "path" FROM "oc_filecache" WHERE ("storage" = $storage) AND ("size" < 0) ORDER BY "fileid" DESC LIMIT 1;'

currently the database will in some cases decide to priorize the sort by fileid over the filter when picking what index to use, resulting in a much slower query.

by creating an index that allows first sorting by fileid and also filter by storage and size this case will be greatly sped up

Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-10-07 16:11:49 +07:00
..
Migrations Update php licenses 2021-06-04 22:02:41 +07:00
AddMissingColumns.php Update php licenses 2021-06-04 22:02:41 +07:00
AddMissingIndices.php add better index for finding unindexed paths 2021-10-07 16:11:49 +07:00
AddMissingPrimaryKeys.php Update php licenses 2021-06-04 22:02:41 +07:00
ConvertFilecacheBigInt.php Update php licenses 2021-06-04 22:02:41 +07:00
ConvertMysqlToMB4.php Update php licenses 2021-06-04 22:02:41 +07:00
ConvertType.php Convert command option defaults to strings 2021-06-09 13:25:31 +07:00