Solve MySQL's com_select state?
This post was last edited by u010572351 on 2013-07-16 09:46:51
Just beginning to learn MySQL optimization, one learns the following statement to be ignorant:
Show session status like ' Com_select ';
There are two kinds of statements:
1. Say this and com_update, Com_insert, Com_delete, respectively, is to inquire about how many times in this session to increase the number of deletions.
2. Also said that not specifically statistical SELECT statement executed how many times, is to count the number of MySQL execution of various query operations (frequency), such as login mysql input password, MySQL will query the administrator password is correct, this query also calculated to Com_select.
However, I query the SELECT statement once, found that Com_select did not increase, use database, Com_select added one.
I do not know now, exactly what operation is the object of Com_select statistic?
Share to:
------Solution--------------------
The manual says
The value of the Com_select is equivalent to:
Qcache_inserts
+ qcache_not_cached
+ Queries with errors found during columns/rights check
Read it slowly.
------Solution--------------------
The translation of your own translation is finished soon?
Simply put:
The com_select variable records the number of queries without caching + Error query + permission check query.
The reason why you query the second Com_select value does not increase, because the query results are cached, if hit cache, the number of cache hits plus 1, that is, the value of the qcache_hits variable plus 1.