Solve the mysql com_select status? At last, this post was edited by u010572351 from 2013-07-1609: 46: 51. I just started learning mysql optimization. Once I learned the following statement, I wrote it: show & nbsp; session & nbsp; status & nbsp; like & nbsp; com_select; two statements: 1. which of the following statements can be used to determine the com_select status of mysql?
This post was last edited by u010572351 at 09:46:51
I just started to learn mysql optimization. Once I learned the following statement, I will explain it:
show session status like 'com_select';
There are two arguments:
1. this is the same as com_update, com_insert, and com_delete. it is used to query the number of additions, deletions, and deletions in this session.
2. in addition, it is not specifically used to count how many select statements are executed. it is used to count the number (frequency) of various query operations performed by mysql, such as logging on to mysql and entering the password, mysql will query whether the administrator password is correct. this query also calculates com_select.
However, when I query the select statement once, I find that com_select is not added. use database, and com_select adds one.
I do not know what operations are the objects of com_select statistics?
Share:
------ Solution --------------------
Manual description
The value of Com_select is equivalent:
Qcache_inserts
+ Qcache_not_cached
+ Queries with errors found during columns/rights check
Study it by yourself
------ Solution --------------------
My translation is not long ago?
Simply put:
The com_select variable records cache-free queries + error queries + permission check queries.
The value of the second com_select query is not increased because the query results are cached. if the cache is hit, the number of cache hits is increased by 1, that is, the value of the Qcache_hits variable is increased by 1.