MySQL: Truncate Table within Transaction?
I have an InnoDB table that needs to be re-populated every ten minutes within anywhere from 60k to 200k records. Our approach up to this point has been as follows: Turn off Autocommit Truncate the table Perform Select Queries & additional Calculations (using PHP) Insert new records Commit After the Truncate operation is performed though, the data is immediately deleted, and is no longer available from the User Interface. To our users, this has been pretty disconcerting, even though within about 30 seconds or so the script encounters the Commit operation and the table is repopulated. I thought