15 messages in com.mysql.lists.win32Re: mysqldumpslow
FromSent OnAttachments
Joelle Tegwen14 Apr 2006 12:01 
jbon...@sola.com.au17 Apr 2006 16:30 
sandhya18 Apr 2006 02:51 
Daniel da Veiga18 Apr 2006 09:45 
Shawn Green18 Apr 2006 10:23 
Na Derro Cartwright18 Apr 2006 12:22 
jbon...@sola.com.au18 Apr 2006 17:33 
Armando18 Apr 2006 21:31 
Joelle Tegwen18 May 2006 08:16 
Joelle Tegwen18 May 2006 10:38 
Tobin Cataldo18 May 2006 11:31 
Joelle Tegwen18 May 2006 13:30 
Tobin Cataldo19 May 2006 06:18 
Joelle Tegwen19 May 2006 08:39 
Joelle Tegwen22 May 2006 07:07 
Subject:Re: mysqldumpslow
From:Tobin Cataldo (tcat@bham.lib.al.us)
Date:05/19/2006 06:18:04 AM
List:com.mysql.lists.win32

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>

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

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