Bug #25855 mysqldumpslow: needs better --help output
Submitted: 25 Jan 2007 20:14 Modified: 25 Jan 2007 21:42
Reporter: Paul DuBois Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: mysqldump Command-line Client Severity:S4 (Feature request)
Version:all OS:Any
Assigned to: CPU Architecture:Any

[25 Jan 2007 20:14] Paul DuBois
Description:
The mysqldumpslow program needs better --help output so that
we can understand what it does.  Currently, mysqldumpslow --help
displays this information:

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 (t, at, l, al, r, ar etc), 'at' is default
  -r           reverse the sort order (largest last instead of first)
  -t NUM       just show the top n queries
  -a           don't abstract all numbers to N and strings to 'S'
  -n NUM       abstract numbers with at least n digits within names
  -g PATTERN   grep: only consider stmts that include 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 several of these options, that just doesn't really convey much useful information.

See also Bug#25631, for which there are difficulties due to the
obscure nature of how mysqldumpslow is supposed to work.

Another problem is that the option structure for this program is
non-standard: It has mostly short (single-letter) options.  Other
MySQL programs generally offer long and short versions of each
option, and where there is only one version, it's the long one.
It would be a good idea to rework the options structure to provide
long options for all options, not just a few as is now the case.

I would be glad to work with one of the developers to produce improved
text it that would be helpful.

How to repeat:
Run mysqldumpslow --help.
[20 Aug 2007 12:12] MySQL Verification Team
See bug: http://bugs.mysql.com/bug.php?id=30498.
[17 Oct 2007 15:51] Nils Goroll
I have fixed the worst missing bits, see Bug #7414
[22 Sep 2008 8:24] Paul DuBois
See also Bug#39491.
[12 Jan 2009 17:39] Paul DuBois
mysqldumpslow is documented in the manual now:

http://dev.mysql.com/doc/refman/5.1/en/mysqldumpslow.html

This doesn't change the --help output, however.