Correct Mysql SLA operations under Linux

Source: Internet
Author: User

The following articles mainly describe how to analyze Mysql mysqlsla in Linux. We use the relevant code to get the correct operation of Mysql mysqlsla in Linux, the following is an introduction to the specific content of the article. I hope you will have a better understanding of it after browsing.

 
 
  1. tar zxvf mysqlsla-2.03.tar.gz   
  2. cp mysqlsla-2.03/bin/mysqlsla /usr/local/bin  

If the message "Can't locate DBI. pm" is displayed, run the following command:

 
 
  1. yum install perl-DBI perl-DBD-MySQL -y  

In this case, you can use mysqlsla. The usage is as follows:

 
 
  1. mysqlsla -lt slow slow.log   
  2. mysqlsla  

Mysql mysqlsla: as a whole, Mysql has powerful functions. Data reports are very helpful for analyzing the causes of slow queries, including execution frequency, data volume, and query consumption.

The format is described as follows:

Total number of queries (queries total), number of SQL statements after deduplication (unique)

Sorted)

The most important slow SQL statement statistics, including average execution time, lock wait time, total number of result rows, and total number of scanned rows.

Count, the number of SQL executions and percentage of the total slow log Count.

Time, execution Time, including the total Time, average Time, minimum, maximum Time, and Time as a percentage of the total slow SQL Time.

95% of Time removes the fastest and slowest SQL statements, and the SQL Execution Time with a coverage rate of 95%.

Lock Time, the waiting Time.

95% of Lock, 95% of slow SQL wait Lock time.

Rows sent, the number of result Rows, including average, minimum, and maximum.

Rows examined: number of Rows scanned.

Database, which Database belongs

Users, which user and IP address account for the percentage of SQL statements executed by all Users

Query abstract: abstract SQL statement

Query sample, SQL statement

The above content is the description of Mysql mysqlsla Analysis in Linux, hoping to help you in this regard.

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.