MySQL Forums
Forum List  »  Newbie

What's the best/fastest way to divide a database into smaller one (MySQL)
Posted by: adrien zemma
Date: October 11, 2022 03:02AM

Hello there,

I have a single database with all my clients and I need to divide it into multiple "little" databases each with one client for post-treatment purposes.
(I have a "clients" table from where all the foreign keys are linked)

The hard part is that this process should run daily and be "fast" how can I do that?

I already try to copy my database into multiple sub bases and use the cascade delete to only keep the client I need on the small base but the process takes at least 30 min. I've used `mysqldump` to generate the original file that's copied into the small table and `cat file.sql | mysql -u...` to right the file in the bases. Those operations are run in a node process to parallelize the tasks but it's still really slow

Options: ReplyQuote


Subject
Written By
Posted
What's the best/fastest way to divide a database into smaller one (MySQL)
October 11, 2022 03:02AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.