Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm looking to tune my query cache a bit. According to 7.6.3.4. 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?

TIA

share|improve this question

1 Answer 1

up vote 4 down vote accepted

The command

show status like 'Com_select%';

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

Try

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

 
discard

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.