October 22, 2014

Write contentions on the query cache

While doing a performance audit for a customer a few weeks ago, I tried to improve the response time of their top slow query according to pt-query-digest‘s report. This query was run very frequently and had very unstable performance: during the time data was collected, response time varied from 50µs to 1s. When I ran […]

Return of the Query Cache, win a Percona Live ticket

It’s Friday again, and time for another TGIF give-away of a Percona Live London ticket! But first, what’s new with the MySQL query cache? You may know that it still has the same fundamental architecture that it’s always had, and that this can cause scalability problems and locking, but there have been some important changes […]

Should we give a MySQL Query Cache a second chance ?

Over last few years I’ve been suggesting more people to disable Query Cache than to enable it. It can cause contention problems as well as stalls and due to coarse invalidation is not as efficient as it could be. These are however mostly due to neglect Query Cache received over almost 10 years, with very […]

mk-query-digest, query comments and the query cache

I very much like the fact that MySQL allows you to embed comments into SQL statements. These comments are extremely convenient, because they are written into MySQL log files as part of the query. This includes the general log, the binary log and the slow query log. Maatkit includes tools which interact with these logs, […]

MySQL random freezes could be the query cache

I feel like I’ve been seeing this a lot lately. occasionally, seemingly innocuous selects take unacceptably long. Or Over the past few weeks, we’ve been having bizarre outages during which everything seems to grind to a halt… and then fixes itself within 5 minutes. We’ve got plenty of memory, we’re not running into swap, and […]

MySQL Query Cache WhiteSpace and comments

Commenting on my previous post on MySQL Query Cache Gerry pokes me as I’m all wrong and both comments and whitespace are fixed in MySQL 5.0. This was not what I remember seeing in production so I decided to do some tests on the matter:

How MySQL Query Cache works with Transactions

As MySQL Manual Says Query Cache works with transactions with Innodb tables but it does not tell you how and with which restrictions. According to my tests it works but it is very restricted and one could expect it to work much better: The result set can be retrieved from query cache (for statements both […]

MySQL Query Cache and prepared statements – support comming ?

Looking at post by Konstantin Osipov we should finally get Query Cache working with prepared statements in MySQL 5.1 The interesting thing Konstantin notes it just took few days to fix it – I believe MySQL Support Team alone spent much more times explaining customers why is it not done or troubleshooting cases with wrong […]

MySQL Query Cache

MySQL has a great feature called “Query Cache” which is quite helpful for MySQL Performance optimization tasks but there are number of things you need to know. First let me clarify what MySQL Query Cache is – I’ve seen number of people being confused, thinking MySQL Query Cache is the same as Oracle Query Cache […]

Query Profiling with MySQL: Bypassing caches

Quite frequently I run into question like this “I’m using SQL_NO_CACHE but my query is still much faster second time I run it, why is that ? The answer to this question is simple – because SQL_NO_CACHE only bypasses query cache but it has no change on other caches, which are MySQL Caches – Innodb […]