Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking to tune my query cache a bit. According to Query Cache Status and Maintenance in the manual:

The Com_select value is given by this formula: Qcache_inserts + Qcache_not_cached + queries with errors found during the column-privileges check

However in 5.1.5. Server Status Variables it suggests that this is maintained by the DBMS. Having said that

mysql> show status like 'Com_select%';

Always returns a value of 1 - and I'm pretty sure I've run more than one non-cached select query on my database since it started.

It looks as if other people are similarly confused.

Is this status variable redundant? Which bit of the manual is wrong?


share|improve this question
up vote 6 down vote accepted

The command

show status like 'Com_select%';

is at the session level. You probably want the server level.


show global status like 'Com_select';
share|improve this answer
Thanks Rolando - that explains why I was getting a value of 1, but the value I do get is approx 10 times Qcache_inserts + Qcache_not_cached (and I don't think 90% of my queries are failing) – symcbean Mar 29 '12 at 10:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.