Solve MySQL's com_select state? How to fix it

Source: Internet
Author: User
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.
  • 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.