MySQL Performance profiling-profiles

Source: Internet
Author: User
Tags what sql

Tag: Init row off SSI time down table function value

First, show profiles
See if the Profiles feature is turned on

mysql> show variables like ‘profiling‘;+---------------+-------+| Variable_name | Value |+---------------+-------+| profiling     | OFF   |+---------------+-------+1 row in set (0.03 sec)

Open profiles in the current session

mysql> show variables like ‘profiling‘;+---------------+-------+| Variable_name | Value |+---------------+-------+| profiling     | OFF   |+---------------+-------+1 row in set (0.03 sec)

Query what SQL the current session has

show profiles

The detailed time spent querying the specified SQL

mysql> show profile for query 3;+----------------------+----------+| Status               | Duration |+----------------------+----------+| starting             | 0.000087 || checking permissions | 0.000017 || Opening tables       | 0.000023 || init                 | 0.000045 || System lock          | 0.000018 || optimizing           | 0.000021 || statistics           | 0.000075 || preparing            | 0.000028 || Sorting result       | 0.000016 || executing            | 0.000015 || Sending data         | 0.000023 || Creating sort index  | 0.026676 || end                  | 0.000026 || query end            | 0.000018 || closing tables       | 0.000020 || freeing items        | 0.000024 || logging slow query   | 0.000038 || cleaning up          | 0.000021 |+----------------------+----------+18 rows in set, 1 warning (0.04 sec)

MySQL Performance profiling-profiles

Related Article

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.