Merge lp:~percona-toolkit-dev/percona-toolkit/pt-query-advisor-docs-2 into lp:percona-toolkit/2.1

Proposed by Daniel Nichter
Status: Merged
Merged at revision: 275
Proposed branch: lp:~percona-toolkit-dev/percona-toolkit/pt-query-advisor-docs-2
Merge into: lp:percona-toolkit/2.1
Diff against target: 81 lines (+14/-26)
1 file modified
bin/pt-query-advisor (+14/-26)
To merge this branch: bzr merge lp:~percona-toolkit-dev/percona-toolkit/pt-query-advisor-docs-2
Reviewer Review Type Date Requested Status
Daniel Nichter Approve
Review via email: mp+108349@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Daniel Nichter (daniel-nichter) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/pt-query-advisor'
2--- bin/pt-query-advisor 2012-05-24 17:25:20 +0000
3+++ bin/pt-query-advisor 2012-06-01 14:35:24 +0000
4@@ -6549,21 +6549,14 @@
5
6 Usage: pt-query-advisor [OPTION...] [FILE]
7
8-pt-query-advisor analyzes queries and advises on possible problems.
9-Queries are given either by specifying slowlog files, --query, or --review.
10+pt-query-advisor analyzes queries and advises on possible problems. It can read
11+queries from several types of log files, or you can use the --query or --review
12+options.
13
14-Analyze all queries in a slow log:
15+To analyze all queries in a MySQL slow query log file:
16
17 pt-query-advisor /path/to/slow-query.log
18
19-Analyze all queries in a general log:
20-
21- pt-query-advisor --type genlog mysql.log
22-
23-Get queries from tcpdump using pt-query-digest:
24-
25- pt-query-digest --type tcpdump.txt --print --no-report | pt-query-advisor
26-
27 =head1 RISKS
28
29 The following section is included to inform users about the potential risks,
30@@ -6572,10 +6565,8 @@
31 tools) and those created by bugs.
32
33 pt-query-advisor simply reads queries and examines them, and is thus
34-very low risk.
35-
36-At the time of this release there is a bug that may cause an infinite (or
37-very long) loop when parsing very large queries.
38+very low risk. At the time of this release we know of no issues that could harm
39+users.
40
41 The authoritative source for updated information is always the online issue
42 tracking system. Issues that affect this tool will be marked as such. You can
43@@ -6586,11 +6577,8 @@
44
45 =head1 DESCRIPTION
46
47-pt-query-advisor examines queries and applies rules to them, trying to
48-find queries that look bad according to the rules. It reports on
49-queries that match the rules, so you can find bad practices or hidden
50-problems in your SQL. By default, it accepts a MySQL slow query log
51-as input.
52+pt-query-advisor applies rules to queries, looking for potential problems.
53+It prints a report of queries that match rules.
54
55 =head1 RULES
56
57@@ -6701,9 +6689,9 @@
58
59 severity: warn
60
61-ORDER BY different directions prevents index from being used. All tables
62-in the ORDER BY clause must be either ASC or DESC, else MySQL cannot use
63-an index.
64+ORDER BY clauses that sort the results in different directions prevents indexes
65+from being used. All expressions in the ORDER BY clause must be ordered either
66+ASC or DESC so that MySQL can use an index.
67
68 =item COL.001
69
70@@ -6806,9 +6794,9 @@
71
72 IN() and NOT IN() subqueries are poorly optimized. MySQL executes the subquery
73 as a dependent subquery for each row in the outer query. This is a frequent
74-cause of serious performance problems. This might change version 6.0 of MySQL,
75-but for versions 5.1 and older, the query should be rewritten as a JOIN or a
76-LEFT OUTER JOIN, respectively.
77+cause of serious performance problems. This might improve in version 5.6 of
78+MySQL, but for versions 5.1 and older, the query should be rewritten as a JOIN
79+or a LEFT OUTER JOIN, respectively.
80
81 =back
82

Subscribers

People subscribed via source and target branches