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>
Loading
Please register or sign in to comment