Multiple Scripts With the Same MySQL Query Running At Once => Will There Be Interference?
- by walden
I want to have multiple scripts running from cron at the same time. They will all update, say, 500 rows with a unique status ID for that particular script to use.
If each script grabs the same type of rows to update, and the scripts run at once, will there be interference between the queries run at the same time? For example, using this query:
UPDATE table SET status = <unique script ID> WHERE status = 0 LIMIT 500
Will I get the same rows updating more than once? I'm trying to get each script to get unique rows. I was thinking of using sleep() to make the queries run at different times, but I'm not sure if that's necessary.
Thanks.