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
Is there a way to defer index creation until everything else is done? #615
Comments
Hi @cmartell-skillz, |
@davidducos yeah, something like that would be amazing! For context, we are running into a ton of issues trying to migrate from RDS to K8s PXC as the pod keeps crashing for x or y reason, and when myloader stops the load due to "MySQL has gone away" there is no resume functionality, so we've been having to destroy the cluster and restart the import. So far, we've been having good success with We're hoping deferring the index creation after importing all tables might help, as even if the pod crashes, we know we can just re-do the index creation. |
@cmartell-skillz, |
@davidducos yup, that's the plan for this weekend. Currently taking a fresh backup and will report back how that goes. Thank you! |
I think that will be nice to have: |
@davidducos AFTER_IMPORT_ALL_TABLES is being ignored. It starts creating indexes as soon as there are no more tables to create on a given thread. In my case I had 3 very large tables still loading (--load-data) and 4 threads. Once all the smaller tables were created the unoccupied thread started creating indexes. It didn't wait until all the other threads had finished loading data. |
Here is how I was using myloader:
|
Is there a way to defer index creation until all the records are inserted? I am trying to restore roughly ~11 TB (when uncompressed), and have some massive tables.
I'm currently running into the issue that if I run the restore without
--innodb-optimize-keys
it takes waay too long, but with the--innodb-optimize-keys
option, once one of the tables finishes loading it immediately starts creating the index while the rest of the tables are still loading data. The sever can't handle this and shortly after I start seeing "MySQL has gone away" errors during the load.Thanks for the utilities, they've been a lifesaver!
The text was updated successfully, but these errors were encountered: