Use of mysqlsla, a log tool for slow database query, which is more powerful than mysqldumpslow.
Install mysqlslaSource code path: https://github.com/daniel-nichter/hackmysql.comSource code storage path:/usr/local/src1. Get source codeIf you do not have the git command, install git first.Yum install git
Cd/usr/local/src
Git clone https://github.com/daniel-nichter/
Tags: store style col MySQL share picture lob Div using indexfirst, MySQL's slow query log opening and storage 1, check whether the SQL records that do not use the index to the slow query log, view the log_queries_not_using_indexe
Tags: write generated bsp MySQL col alt units should be two kinds ofInput command:show variables like ' slow% ' You can find that Slow_query_log is OFF (default), indicating that the slow query log is not turned on Slow_query_log_file for slow
In windows, mysql5620 used mysqldumpslowpl to analyze slow logs. Today, we see a tool pt-query-digest, which was originally intended to be installed and used on windows. The result is to run C on windows: before ProgramFilesMySQLMySQLServer56b, mysql5.6.20 in windows used mysqldumpslow. pl analyzes slow logs. Today, we see pt-
The slow query log is used to optimize the query statement, the following are several parameters, 5.5 can be later to the subtle (MS)Mysql> Show variables like '%slow% ';+---------------------------+-------------------------------+| variable_name | Value |+------------------
/etc/my.cnf Log-slow-queries=/usr/local/mysql/slowquery.log (Specify the log file location, can be empty, the system will give a default file Host_name-slow.log)Long_query_time=1 (record over time, default is 10s)Log-queries-not-using-indexes (log down without using the inde
Mysql slow query logs are very useful for queries with tracing problems. We can analyze the resource-consuming SQL statements in the current program. How can we open mysql slow query log records?
In fact, it is very easy to open the slo
MySQL slow query log can record the query time is too long SQL, for performance problem positioning is very important, this article is intended to introduce the slow query log managemen
Tags: res Modify query--1.0 system parameter query log okay.First, Introduction to open the slow query log, you can let the MySQL record query over a specified time of the statement, th
Tags: www record test multiple restart version set requires widthMySQL has a log, called the slow query log , is mainly used to record some time-consuming query For With this log we can analyze what operations are impacting perfo
Quick Start of MySQL slow log query method bitsCN.com
MySQL slow log query is unfamiliar to many new users who are new to MySQL data. The following describes the usage and benefits of MySQL sl
Linux enable MySQL slow query
The code is as follows
Copy Code
Vim/etc/my.cnf[Mysqld]Slow-query-log = on # Open slow query functionSlow_query_log_file =/usr
Enable mysql slow query log and run mysqldumpslow to view mysqldump
BitsCN.com
Enable mysql slow query logs and run the mysqldumpslow command to view the logs.
The mysql server has a function to detect which SQL statement query
Label:Found that there is a tool mysqlsla, analysis query log than Mysqldumpslow analysis will be more clear!Install Mysqlsla:Download mysqlsla-2.03.tar.gz[Email protected] export]# TAR-XVF mysqlsla-2.03.tar.gz[email protected] export]# Yum install *dbi*[Email protected] mysqlsla-2.03]# Perl makefile.plCan ' t locate time/hires.pm in @INC (@INC contains:/usr/local/lib64/perl5/usr/local/share/perl5/usr/lib64
Label:Found that there is a tool mysqlsla, analysis query log than Mysqldumpslow analysis will be more clear!Install Mysqlsla:Download mysqlsla-2.03.tar.gz[Email protected] export]# TAR-XVF mysqlsla-2.03.tar.gz[email protected] export]# Yum install *dbi*[Email protected] mysqlsla-2.03]# Perl makefile.plCan ' t locate time/hires.pm in @INC (@INC contains:/usr/local/lib64/perl5/usr/local/share/perl5/usr/lib64
Environment Introduction:Yum uses a source of 163: Centos6-base-163.repoOperation of the new system: Red Hat Enterprise Linux Server Release 6.4Database version: 5.6.27PHP Version: 5.3.3 #要求php版本大于5.3percona-toolkit:2.2.1710.10.203.102 "Web Server"10.10.203.93 "Monitored side"You need to do all the work on both machines, there are notes on the steps.Operation Steps:
Installation of the Percona-toolkit tool
10.10.203.93 and 10.10.203.102 are installedPt-
First, IntroductionMysqlsla is a tool for analyzing the MySQL slow log , which analyzes the reasons for slow queries, including the number of times a SQL is executed and the percentage of slow log data, execution time, waiting time, and so on. The company's database has a lo
MySQL slow log query is unfamiliar to many new users who are new to MySQL data. The following describes the usage and benefits of MySQL slow log query for your reference. Mysql has a function to
Mysqlsla is a MySQL log analysis tool launched by hackmysql.com, which is very powerful. Data reports are very useful for analyzing the causes of slow queries, including frequency of execution, amount of data, query consumption, etc.First, use
1
# mysqlsla -lt slow mysql-slow.log
Or
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.