2
Monitoring the database (Mysql) through Monyog I realize that when some very large query is executed (SELECT) and, at the same time, an update query also runs, under the same table, the update is waiting for SELECT to finish.
The result of this is that the table is locked waiting (locked). And with this, all other query’s under this table (currently executed) do not run until finished, thus generating a major system crash.
How to solve this problem?
After performing a search, I understood that this is a standard behavior of the Myisam engine. That is, I should try to optimize my query’s even more so that they don’t have a high time. Correct?
– Marcony Felipe
Myisam is a disused engine, I recommend changing the engine to Innodb. If this is not possible, put
EXPLAIN
before yourSELECT
to see what is impacting the query :)– Rodrigo Rigotti