Use MySQL 5.7.9 as the monitoring database for Zabbix 2.4.7. Some time ago opened a slow query log, and later found that the slow query log expanded to 700M
See the last 100 most of them are 0.1 seconds later want to change, prev
Mysql> showvariables like '%version% ';+-------------------------+---------------------+| variable_name | Value |+-------------------------+---------------------+|innodb_version | 5.5.31 ||protocol_version | 10 ||slave_type_conversions | || Version | 5.5.31-log ||version_comment | sourcedistribution ||version_compile_machine | x86_64 ||version_compile_os | Linux |+-------------------------+---------------------+7 rows in Set (0.00SEC)Turn on
In MySQL, the slow query log is often used as the basis for us to optimize the database, if there is a similar function in MongoDB? The answer is yes, that's MONGO database Profiler. Not only, but also some slow Query than MySQL Log
MySQL slow query, MySQL
Brief description:
To analyze the query performance of MySQL statements, in addition to using the EXPLAIN command to output the execution plan, MySQL can also record the statements whose query exceeds the specified time, the SQL statement query that e
Label:OverviewThis chapter mainly writes about how to generate a new slow query file online when the slow query file is very large. Test environment: MySQL 5.6.21 StepsConfigure Slow Query The default my.cnf file is in the/etc/dir
Tags: completely database getting server wholeIf you ' re just completely itching to start using the This tool, here's what you need:1, a MySQL database to store query analysis data in.2, Pt-query-digest. You could as well just get the whole Percona Toolkit when you ' re at it:)3, a slow query
condition, when the next use--Review, if there is the same statement analysis, it is not recorded in the data table. --output # #分析结果输出类型, values can be report, Slowlog, JSON, json-Anon, the report is generally used for readability. --since # #从什么时间开始分析, the value is a string, which can be specified as "yyyy-mm-DD[Hh:mm:ss] ", s (seconds), H (Hours), M (minutes), D (days), such as 12h means starting from 12 hours ago statistics. --until# #截止时间, with-since you can analyze
Label:Memo from: http://blog.csdn.net/seteor/article/details/24017913 1. Introduction to Tools Pt-query-digest is a tool for analyzing slow queries for MySQL, which analyzes Binlog, general log, Slowlog, It can also be analyzed using showprocesslist or MySQL protocol data crawled by tcpdump. The analysis results can be exported to a file, the analysis process is
MySQL slow Query
Brief description:
To analyze the query performance of MySQL statements, in addition to using the EXPLAIN command to output the execution plan, MySQL can also record the statements whose query exceeds the specified time, the SQL statement query that exceeds
Original address:mysql slow log file analysis processing MaxyichaMySQL has a function that can log down to run the slow SQL statement, the default is not the log, in order to enable this function, to modify the my.cnf or when MySQL started to add some parameters.If you modi
MySQL clears slow Query filesThis chapter describes how to generate a new slow Query file online when the slow Query file is large. Test environment: mysql 5.6.21 step configuration slow
Tags: mysql slow log analysisMysqldumpslow is a tool that MySQL comes with to analyze slow queries, of course, not just this tool, but Percona-toolkit is Percona A collection of a set of command-line tools that are used to perform a variety of manual execution of very complex and troublesome MySQL related tasks, including the following:Check master and slave data
Label:Summary of reasons for slow Oracle query speedThe reasons for the slow query are many, and the following are common:1, no index or no index (this is the most common problem of slow query, is the defect of program design)The
. // Do NOT allow this operation to be written to binlog. set session SQL _log_bin = 0; use mysqlCREATE TABLE 'slow _ log' ('start _ time' timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, 'User _ host' mediumtext not null, 'query _ time' time not null, 'lock _ time' time not null, 'rows _ sent 'int (11) not null, 'rows _ examined' int (11
Mysql slow query Usage Details
1. Definition of slow QueryMysql records all SQL statements that have been executed beyond the time threshold set by the long_query_time parameter. Slow query logs are the logs that record these SQL statements.
2. Enable
/*!*/;Mysqlbinlog:file ' log-file ' not Found (errcode:2)DELIMITER;# End of log fileROLLBACK/* Added by Mysqlbinlog */;/*!50003 SET [email protected]_completion_type*/; Ddkosooodfdsfsfs/*!50530 SET @ @SESSION. pseudo_slave_mode=0*/;[email protected]:/#(3) Slow query logLogs a log
1 Slow query definition
MySQL records all SQL statements that execute a time threshold that exceeds the Long_query_time parameter setting. The slow query log is the log that logs these SQL.
2 Open
Briefly:The method of analyzing the performance of MySQL statement query in addition to using the EXPLAIN output execution plan, you can also let the MySQL record query over a specified time of the statement, we will exceed the specified time of the SQL statement query is called "Slow
InstallationMysqlsla is a feature that helps with parsing, filtering, and sorting of MySQL slow query logs, binary logs, and more. Overall, the functionality is very powerful. can make SQL query data report, analysis including execution frequency, data volume, query consumption, etc.And the tool comes with similar SQL
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.