-
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: add index on oc_filecache over size, parent and storage to speed… #40633
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
cf16337
to
9306b8e
Compare
public function changeSchema(Schema $schema, array $options): void { | ||
$prefix = $options['tablePrefix']; | ||
$table = $schema->getTable("{$prefix}filecache"); | ||
$table->addIndex(['size', 'parent', 'storage']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some customers propose to change the order and put size last to optimize the index further
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also keep in mind that the index needs to be updated if size changes.
… up Cache::calculateFolderSize
9306b8e
to
701777d
Compare
💥 Acceptance tests pipeline apiProxySmoke-8-7-mariadb10.2-php7.4 failed. The build has been cancelled. |
💥 Acceptance tests pipeline webUISharingExt1-git-chrome-mariadb10.2-php7.4 failed. The build has been cancelled. |
💥 Acceptance tests pipeline webUISharingExt2-latest-chrome-mariadb10.2-php7.4 failed. The build has been cancelled. |
Kudos, SonarCloud Quality Gate passed! |
… up Cache::calculateFolderSize
Description
Folder sizes are computed quite often - especially on massive file upload.
Before
After
Related Issue
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: