From: Johan De Meersman Date: October 7 2011 9:41am Subject: Re: 4 minute slow on select count(*) from table - myisam type List-Archive: http://lists.mysql.com/mysql/225956 Message-Id: <4410841e-14c4-4360-88fc-8bd95b3b0484@zimbra> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Good to see the issue has been solved. What I noticed in the mysqltuner output, is that you may want to enlarge your table_cache and open files limit before you run into problems there. ----- Original Message ----- > From: "Johnny Withers" > > I haven't used MYISAM in a long time, so i'm not sure about this > but.. is the INSERT locked due to the SELECT queries that have been running > for so long? And are the rest of the selects (with <8s running time) locked > by the INSERT? Yes, because MyISAM doesn't have a mechanism for keeping multiple concurrent consistent views on a table, SELECT also locks the table for writes. There is one important and occasionally useful exception, though: if there are no holes in the table (ie, if you haven't done any deletes) the engine will allow inserts to append to the table while selects are happening. -- Bier met grenadyn Is als mosterd by den wyn Sy die't drinkt, is eene kwezel Hy die't drinkt, is ras een ezel