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

[20] add a prefix index to filecache.path, attempt 2 #29364

Closed
wants to merge 2 commits into from

Conversation

icewind1991
Copy link
Member

Backport of #28541 to stable20

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>
having the index work properly for the queries we need it for requires some additional options which dbal does not support at the momement.
to prevent making it harder to add the correct index later on we don't create the index for now on postgresql

Signed-off-by: Robin Appelman <robin@icewind.nl>
@icewind1991 icewind1991 added the 3. to review Waiting for reviews label Oct 21, 2021
@icewind1991 icewind1991 added this to the Nextcloud 21.0.6 milestone Oct 21, 2021
* @return AbstractPlatform
*
* @throws Exception
* @since 23.0.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm, adding APIs in backports ? 🤔

@blizzz blizzz mentioned this pull request Nov 3, 2021
10 tasks
@rakekniven rakekniven removed this from the Nextcloud 20.0.14 milestone Nov 19, 2021
@PVince81
Copy link
Member

NC 20 is EOL, closing

@PVince81 PVince81 closed this Jan 11, 2022
@skjnldsv skjnldsv deleted the path-prefix-index2-20 branch January 18, 2022 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants