Answer the question
In order to leave comments, you need to log in
How to update more than 500k rows without a long MySQL table lock?
After parsing the price, a very large complex SQL query is executed (UPDATE)
Is it possible to break one large query into many smaller ones?
In laravel -> ORM Eloquent ?
And SpringBoot -> Hibernate(Persistence) ?
In order not to duplicate the question, please give a solution for two different platforms
(Two projects, one problem)
Answer the question
In order to leave comments, you need to log in
Option 1. Update data in chunks. Blocking will still be, but small.
Option 2. Master-slave replication. Update data on master and read from slave. In this case, the master lock will not prevent data from being read from the slave. As a bonus - increased fault tolerance.
Copy the table that you are going to change to another table, update the data there, rename or transfer the data back. I think so.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question