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 a prefix index to filecache.path #26070

Merged
merged 1 commit into from
Mar 19, 2021
Merged

add a prefix index to filecache.path #26070

merged 1 commit into from
Mar 19, 2021

Commits on Mar 19, 2021

  1. add a prefix index to filecache.path

    The reason that `filecache.path` hasn't had an index added is the mysql limitation of ~1kb for indexeded fields,
    which is to small for the `path`, however mysql supports indexing only the first N bytes of a column instead of the entire column,
    allowing us to add an index even if the column is to long.
    
    Because the index doesn't cover the entire column it can't be used in all situations where a normal index would be used, but it does cover the `path like 'folder/path/%'` queries that are used in various places.
    
    Sqlite and Postgresql don't support prefix indexes, but they also don't have the 1kb limit and DBAL handles the differences in index creation.
    
    Signed-off-by: Robin Appelman <robin@icewind.nl>
    icewind1991 committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    b28f0a0 View commit details
    Browse the repository at this point in the history