Re: mysqldumpslow
Tobin Cataldo <[email protected]>
| Newsgroups | gmane.comp.db.mysql.windows |
|---|---|
| Message-ID | <[email protected]> |
To get the lines from the MSDOS prompt try -> right-click select all, ctrl-c. Then paste in TextPad or something. I have read that mysqldumpslow doesn't handle prepared statements (not sure if this is applicable)... You might try running the mysqldumpslow on a limited test. In fact, grab the examples below and run the mysqldumpslow against it, and compare it against the results I got (shown below). If you get the same, then I would suggest looking at the structure of your slowlog... Or change slowlog to a new log temporarily (mysql server needs to be restarted making a change to the logs) run a few queries in the mysql> prompt (this way you know they are not 'prepared' queries), then check against mysqldumpslow. My slowlog looks like this: C:\mysql\bin\mysqld-max-nt, Version: 5.0.18-nt-max-log. started with: TCP Port: 3306, Named Pipe: (null) Time Id Command Argument # Time: 060518 13:28:33 # User@Host: root[root] @ localhost [127.0.0.1] # Query_time: 0 Lock_time: 0 Rows_sent: 1 Rows_examined: 1 SHOW VARIABLES LIKE 'datadir'; # User@Host: root[root] @ localhost [127.0.0.1] # Query_time: 0 Lock_time: 0 Rows_sent: 1 Rows_examined: 1 SHOW VARIABLES LIKE 'log_error'; C:\mysql\bin\mysqld-max-nt, Version: 5.0.18-nt-max-log. started with: TCP Port: 3306, Named Pipe: (null) Time Id Command Argument C:\mysql\bin\mysqld-max-nt, Version: 5.0.18-nt-max-log. started with: TCP Port: 3306, Named Pipe: (null) Time Id Command Argument My output looks like this: C:\mysql\scripts>perl mysqldumpslow -s=t -t=2 c:\mysql\data\slowlog2.txt Reading mysql slow query log from c:\mysql\data\slowlog2.txt Count: 1 Time=0.00s (0s) Lock=0.00s (0s) Rows=0.0 (0), 0users@0hosts C:\mysql\bin\mysqld-max-nt, Version: N.N.N-nt-max-log. started with: TCP Port: N, Named Pipe: (null) # Time: N N:N:N # User@Host: root[root] @ localhost [N.N.N.N] # Query_time: N Lock_time: N Rows_sent: N Rows_examined: N SHOW VARIABLES LIKE 'S' Count: 1 Time=0.00s (0s) Lock=0.00s (0s) Rows=1.0 (1), root[root]@localhost SHOW VARIABLES LIKE 'S'; C:\mysql\bin\mysqld-max-nt, Version: N.N.N-nt-max-log. started with: TCP Port: N, Named Pipe: (null) C:\mysql\bin\mysqld-max-nt, Version: N.N.N-nt-max-log. started with: TCP Port: N, Named Pipe: (null) C:\mysql\scripts> Tobin Cataldo Joelle Tegwen wrote: > Ok, so I didn't get the error, but I get this huge long scroll of SQL > statements with a space between each letter. I can't even see the > beginning of the scroll because it maxes out the buffer. > > I thought that saying -t=1 would only give me one query am I > misunderstanding this? > > Thanks much > Joelle > > Tobin Cataldo wrote: >> I was able to reproduce the error by setting -t= <Number greater than >> actual queries in log> >> >> Try setting -t = 1 or -t = 2. Or take a look at the log txt file and >> see if you have at least 5 queries in there. >> >> >> Tobin Cataldo >> >> >> Joelle Tegwen wrote: >>> ok, so I got it running... thanks.. >>> >>> and I type >>> C:\Program Files\MySQL\MySQL Server 5.0\scripts>perl mysqldumpslow >>> -s=t -t=5 c:\mysql\slowlog20060518.txt >>> and I get this big long scroll of sql statements and then this: >>> Died at mysqldumpslow line 137, <> chunk 1. >>> >>> What does that mean? >>> Thanks >>> Joelle >>> >>> >> >> > -- MySQL Windows Mailing List For list archives: http://lists.mysql.com/win32 To unsubscribe: http://lists.mysql.com/[email protected]