Skip to content

Add index to share_with column in the share table - #7517

Merged
rullzer merged 4 commits into
masterfrom
add-index-to-share-table
Dec 18, 2017
Merged

Add index to share_with column in the share table#7517
rullzer merged 4 commits into
masterfrom
add-index-to-share-table

Conversation

@schiessle

Copy link
Copy Markdown
Member

Add a index to share_with. This should improve the performance quite a bit as we need to query all shares with a specific user every time we set up the file system.

For updating existing instances I created a occ script instead of a automated update step because this can take quite some time for large installation.

use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class AddIndexToShareTable extends Command {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can't we do it more generic? Like have an "create indexes" occ command. We list all the indexes that need to be added here. And just check if there already is one. If so we skip. If not we add it?

That way we can easily add more indexes later. instead of having multiple different commands (because there are some still missing I bet).

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

sounds good, I will name it more generic

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

done, please review 😃

@codecov

codecovBot commented Dec 15, 2017

Copy link
Copy Markdown

Codecov Report

Merging #7517 into master will decrease coverage by 0.01%.
The diff coverage is 0%.

@@ Coverage Diff @@## master #7517 +/- ##
============================================
- Coverage 51.18% 51.17% -0.02% - Complexity 24874 24881 +7 
============================================
Files 1601 1602 +1 Lines 94701 94726 +25 Branches 1368 1368 ============================================
- Hits 48474 48473 -1 - Misses 46227 46253 +26
Impacted FilesCoverage ΔComplexity Δ
core/register_command.php0% <0%> (ø)0 <0> (ø)⬇️
core/Command/Db/AddMissingIndices.php0% <0%> (ø)7 <7> (?)
core/Migrations/Version13000Date20170718121200.php0% <0%> (ø)30 <0> (ø)⬇️
lib/private/Files/Cache/Propagator.php94.93% <0%> (-1.27%)16% <0%> (ø)
lib/private/Server.php81.34% <0%> (-0.12%)134% <0%> (ø)
lib/private/Security/CertificateManager.php92.07% <0%> (+0.99%)39% <0%> (ø)⬇️

@schiessle
schiessleforce-pushed the add-index-to-share-table branch from 371bb26 to c64884eCompareDecember 15, 2017 09:49
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
@rullzer
rullzerforce-pushed the add-index-to-share-table branch from 0298fe1 to 21489d5CompareDecember 18, 2017 20:16
@rullzer

Copy link
Copy Markdown
Member

I rebased on master.
And ran the autoloader with the latest composer.

@rullzerrullzer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Makes a lot of sense!
Works like a charm here.

@rullzer
rullzer merged commit e294323 into masterDec 18, 2017
@rullzer
rullzer deleted the add-index-to-share-table branch December 18, 2017 21:23
@MorrisJobkeMorrisJobke mentioned this pull request Jan 2, 2018
30 tasks
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsfeature: sharing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@schiessle@rullzer@icewind1991