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

add better index for finding unindexed paths #29118

Merged
merged 1 commit into from
Oct 8, 2021
Merged

Commits on Oct 7, 2021

  1. 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>
    icewind1991 committed Oct 7, 2021
    Configuration menu
    Copy the full SHA
    6502dfa View commit details
    Browse the repository at this point in the history