List:Internals« Previous MessageNext Message »
From:Paul DuBois Date:March 13 2003 3:32pm
Subject:Re: query cache hits not counted in Com_select (fwd)
View as plain text  
At 22:33 -0800 3/12/03, John David Duncan wrote:
>On Tue, 11 Mar 2003, Sanja Byelkin wrote:
>
>>  Com_select counts only executed SELECTs. In case of cached
>>  SELECTs it is just cache reply but execution (no tables opened, no record
>>  scanned and so on).
>>
>>  I.e. it is not bug but expected behaviour.
>
>On further consideration I have one more note.  If "Com_X" is supposed to
>only count _executed_ Xs, then this one is inconsistent:
>
>mysql> show status like 'com_drop_table';
>+----------------+-------+
>| Variable_name  | Value |
>+----------------+-------+
>| Com_drop_table | 0     |
>+----------------+-------+
>1 row in set (0.00 sec)
>
>mysql> drop table yayaya;
>ERROR 1051: Unknown table 'yayaya'
>mysql> show status like 'com_drop_table';
>+----------------+-------+
>| Variable_name  | Value |
>+----------------+-------+
>| Com_drop_table | 1     |
>+----------------+-------+
>1 row in set (0.00 sec)

The server executed it.  The result was that it failed.

By the way (back to your original question), if you want to get a count
of all SELECT queries, including those served out of the query cache, use
the sum of Com_select and Qcache_hits.

>
>- JD

Thread
query cache hits not counted in Com_select (fwd)John David Duncan11 Mar
  • Re: query cache hits not counted in Com_select (fwd)Sanja Byelkin11 Mar
    • Re: query cache hits not counted in Com_select (fwd)John David Duncan11 Mar
    • Re: query cache hits not counted in Com_select (fwd)John David Duncan13 Mar
      • Re: query cache hits not counted in Com_select (fwd)Tim Bunce13 Mar
      • Re: query cache hits not counted in Com_select (fwd)Paul DuBois13 Mar