Solve the mysql com_select status? How to solve

Source: Internet
Author: User
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 & solve the mysql com_select status?
At last, this post was edited by u010572351 at 09:46:51 and 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.