Mysqldumpslow Instructions for use

Source: Internet
Author: User
Tags mysql slow query log

Mysqldumpslow Instructions for use

Mysqldumpslow--help

Usage:mysqldumpslow [OPTS ...] [LOGS ...]

Parse and summarize the MySQL slow query log. Options are

--verbose verbose
--debug Debug
--help write this text to standard output

-V Verbose
-D Debug
-S ORDER what to sort by (Al, at, AR, C, L, R, T), ' on ' is default
Al:average Lock Time
Ar:average rows Sent
At:average Query Time
C:count (number of occurrences)
L:lock time
R:rows sent
T:query time
-R Reverse the sort order (largest last instead of first) (sort from large to small)
-T NUM just show the top n queries (highest n queries)
-A don ' t abstract all numbers-N and strings to ' S '
-N NUM abstract numbers with at least n digits within names
-G PATTERN Grep:only Consider stmts that include the This string
-H HOSTNAME HOSTNAME of DB Server for *-slow.log filename (can be wildcard),
Default is ' * ', i.e. match all
-I name name of server instance (if using Mysql.server startup script)
-L don ' t subtract lock time from total time

For example:

Analyze the top n slow SQL with the highest frequency:

Mysqldumpslow-s c-t N Mysql-slow.log

If you just need to analyze the slowest n SQL for processing:

Mysqldumpslow-t N Mysql-slow.log

Mysqldumpslow Instructions for use

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.