MySQL Forums
Forum List  »  Performance

Re: SQL_NO_CACHE, RESET QUERY CACHE, FLUSH TABLES not working
Posted by: Vince Gatto
Date: September 06, 2008 12:23AM

It's easy to check if the query cache is being used. Just watch the value of SHOW STATUS LIKE 'Qcache_hits'. If it doesn't change, you're not hitting the cache.

Even with the query cache off, your results are probably normal. MySQL's storage engines implement caching of index and data pages which are frequently used to improve performance. You can't really turn this off (though you can limit the memory they use). Even your operating system will cache frequently accessed disk blocks in memory. All this means that even with the query cache off, your queries should be slowest the first time they are executed, and then speed up after that.

If your goal is to profile your database performance, it's best to find a way to simulate the actual load it will be seeing.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: SQL_NO_CACHE, RESET QUERY CACHE, FLUSH TABLES not working
18484
September 06, 2008 12:23AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.