I have a constant stream of "select ... for update" queries in the inndob table.
The basic condition is that it selects all fields where 'column1' is <less than 100.
In the background, constant inserts occur, which can include inserts where "column1" is <less than 100, but this is not a problem. If the first choice for updating skips it because it occurs during the execution of this query or while the array of results is retrieved, the next one will catch it, and I am glad to mark the first query as missing because it was 'too late.'
If I have 10 of these โselect for upgradeโ queries because of blocking the inndob field, should I manage their queue myself or allow sorting of the database? I guess the right way to handle this is to queue the queries yourself?
So when the script reaches
$sql = "SELECT * FROM ... FOR UDPATE"
Check the queue array (?) First, if the queue array is not empty, put this script call in the queue array at the end, and then check the queue array every few milliseconds until it reaches number 1 in the queue
I think of the correct lines here ... It is important that I understand this now, and not return to it later
Edit: is there anything I can add to increase the likelihood of an answer :)
source share