-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
fix: optimize preview cleanup sql #40514
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
the failing test:
|
oldie ..... |
df9d791
to
b6f7436
Compare
@phil-davis I just have rebased but the test |
It cannot be fixed - see #40426 |
@mmattel that CI pipeline has been out-of-action for "a long time". I have been waiting for a replacement Windows SMB share to be made available for CI, but no joy yet. If someone reviews and approves the PR, then I (or someone else) can post a "success" drone result and merge the PR. @DeepDiver1975 you have set the "3 - To Review" label, but nobody is actually called up as reviewers, and this has not been added to the "ownTeam Board" project, and there is no PR description or changelog. Is it really ready for review? |
We are looking forward to have 10.12 in a forseeable timeframe and this fix is more than welcomed to get in. |
There is no label set because I do not consider this finished. If time permits I will return 🙈 |
I can see that the "3 - To Review" label was set on Nov 29, 2022 - that is what made me ask if it is really ready for review. |
😕 |
My current objection:
|
b6f7436
to
b5846e2
Compare
rebased |
💥 Acceptance tests pipeline webUITrashbin-chrome-mariadb10.2-php7.4 failed. The build has been cancelled. |
💥 Acceptance tests pipeline webUISharingAcceptSh-chrome-mariadb10.2-php7.4 failed. The build has been cancelled. |
💥 Acceptance tests pipeline webUISharingIntUsers1-chrome-mariadb10.2-php7.4 failed. The build has been cancelled. |
💥 Acceptance tests pipeline webUITags-chrome-mariadb10.2-php7.4 failed. The build has been cancelled. |
b5846e2
to
f52b2b0
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
At least CI is now green after it refused to get there 😄 |
I'd like to see some comments on the subquery
I'd say, his almost always returns empty, as the numeric fileid - (even if cast to string) is very unlikely to be equal to the name?? |
absolutly not - for thumbnails the the folder name is the fileid. Believe it or not - this is all done by intention ;-) |
Understood. I thought, that something like
should be safter, but I could not provoke any misbehaviour. |
Something to consider is to remove the sorting and make a query per user. Using fileid > 1
Without sorting and fileid > 1 and user_id = admin
The search on the oc_mount table should use an index now, boosting the performance. Previously, we had to sort a temporary table that didn't seem to be indexed. Note that there could be thousands of users, so that temporary table could be really huge. |
The order by is necessary so that the pagination will work in a predictable manner. |
With around 2000 images for Brian and 100 images for Carol, these are the results for the queries:
|
Analysis from the new query:
Previous query:
|
I agree with @jvillafanez that this is yet another optimization opportunity .... but maybe something for a followup pr ... |
Do we need any changelog? |
argh - totally missed that .... will submit pr ... |
Description
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: