-
Notifications
You must be signed in to change notification settings - Fork 824
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
Slow dev/build
process on large datasets due to CHECK TABLE being enabled by default.
#9966
Comments
Recommend disabling this setting by default and making it opt-in. AND/OR changing logic so that CHECK TABLE / REPAIR TABLE is part of a different flow (e.g. Is not executed on every dev/build call, but only when required / wanted or perhaps through different dev/ call all together.). Alternatively it could be removed entirely in favor of CHECK TABLE being a Database Administrator task rather than an application task (E.g. Scheduled checks of Tables in database outside of Application). This could work as CHECK TABLE calls to a database do not require any context of PHP Code. |
Example performance improvements observed on project. Database Size: 3.1GB Changes
|
Talking about this internally, it sounds like there's a few more options here. Instead of changing the default value, we could also: a. Document this workaround as a valid option for those who are experiencing performance issues during dev/build. Feels like if we don't have one already, an existing dev docs page for sites with very large sites could be worthwhile. Before changing the default value in framework we'd want to spend more time researching what the risks of doing so would be, and why it was added in the first place. @brettt89 do you have any thoughts on the above options? |
@brynwhyman Agree that are probably more options here than my initial thoughts.
So removing it entirely may be counter productive, and its only a massive performance issue for 'Large Database Tables'. So perhaps a combination of ideas in that it can be "enabled/disabled 'per-table'" + heavier documentation around performance considerations on large datasets / websites. e.g. Ability for developers to disable
|
Affected Version
All
Description
While investigating performance issues with dev/build processes on larger applications with large datasets, it has been identified that performing a
CHECK TABLE
on every Silverstripe table for each release causes the process to take a large amount of time to complete.Reference: https://dev.mysql.com/doc/refman/5.7/en/check-table.html
Steps to Reproduce
Most noticeable on tables using
silverstripe-versioning
with large datasets in those tables.E.g.
ChangeSetItem
table from Silverstripe Versioning with 5 Million row records.CHECK TABLE takes 5+ minutes to complete on MySQL with 2vCPU and 4GB RAM.
Workaround
Silverstripe 4.1+
Developers can opt-in to disabling this currently by using the following YML configuraiton.
The text was updated successfully, but these errors were encountered: