Answer the question
In order to leave comments, you need to log in
How to organize delayed application of changes in mysql?
There is a site where a PHP script processes an xml file in the background and makes changes to the site about products / categories.
Tell me how to first make changes to the database, and when everything is ready and the PHP script finishes its work, apply the changes.
Now the volume of xml files has increased and the php script needs about half an hour to disassemble.
There is an idea to create a second database, a copy, where to make changes, and then generate an SQL script and execute it on the main database. But maybe there is something easier?
Answer the question
In order to leave comments, you need to log in
If it is possible to make changes to the database structure and to the logic of the application, then you can add a flag to the tables, which will mean that the record is not yet ready for production.
Remove the flag at the end of data processing - this is where transactions come in handy.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question