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

dev/build slow with large tables, allegedly because of orphan record cleanup. #7944

Closed
1 task
mateusz opened this issue Mar 19, 2018 · 4 comments
Closed
1 task

Comments

@mateusz
Copy link
Contributor

mateusz commented Mar 19, 2018

Affected Version

@tractorcow says it's the same on master. I found it on 3.5.

Description

On a SS installation with large MyISAM tables (this one has 1 million rows) dev/build takes long time.

Specifically, dev/build takes 6 minutes after OPTIMIZE TABLE, on a DB box with 1GB RAM, with the following queries taking the bulk of time (1.5 mins each or so): https://gist.github.com/mateusz/491d79d8bc2eecd82fa3c96cbc6a4992 .

Allegedly this is part of the dev/build orphan cleanup process.

It seems wasteful to be forced to run this on every deploy. It would be good if de-orphaning could be bypassed similarly as dont_populate allows to bypass requireDefaultRecords.

Or whatever other way to allow us to run de-orphanisation less frequently than business-as-usual dev/builds.

PRs:

@chillu
Copy link
Member

chillu commented Mar 26, 2018

Marked this as a high impact enhancement, since it affects every deploy (on SilverStripe Platform or otherwise)

@tractorcow
Copy link
Contributor

This should not be a big job, ok for me to pre-size as 2? It'll just be a flag to allow this orphan check to be disabled.

@chillu
Copy link
Member

chillu commented Mar 28, 2018

Sweet, approved

@tractorcow tractorcow self-assigned this Apr 4, 2018
tractorcow pushed a commit to open-sausages/silverstripe-versioned that referenced this issue Apr 4, 2018
BUG Fix cleanupVersionedOrphans breaking on table case change
BUG Use single query for deleting orphans for better performance on huge datasets
Fixes silverstripe#139
Fixes silverstripe/silverstripe-framework#7944
@tractorcow
Copy link
Contributor

Fixed with silverstripe/silverstripe-versioned#140

@tractorcow tractorcow removed their assignment Apr 4, 2018
tractorcow pushed a commit to open-sausages/silverstripe-versioned that referenced this issue Apr 6, 2018
BUG Fix cleanupVersionedOrphans breaking on table case change
Fixes silverstripe#139
Fixes silverstripe/silverstripe-framework#7944
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants