Aa.... otkud znaš da je lock trećeg izazvao prvi, a ne drugi upit (UPDATE)?
Vidi i ovo:
SHOW PROCESSLIST; also helps a lot.
...
MyISAM doesn’t support transactions, and prioritises updates over reads. To avoid inconsistent data, reads can cause implicit table locks.
Where this matters is a situation like the following:
SELECT * from bigTable WHERE (complicatedQueryConditions);
UPDATE bigTable SET someField=someField+1 WHERE id=1;
The SELECT will lock out the UPDATE until it finishes, and because updates are prioritised over reads and new selects will in turn be waiting for the UPDATE to finish.
__________________
Commercial-Free !!!
|