3

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

symcbean
  • 19,931
  • 1
  • 29
  • 49

1 Answers1

7

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';
RolandoMySQLDBA
  • 16,364
  • 3
  • 47
  • 80
  • 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