Re: Perl Script: MySQL Slow Query Log Parser

2001-07-22 Thread Tim Bunce

Great. Thanks.

Tim.

- Original Message - 
From: Jeremy Zawodny [EMAIL PROTECTED]
To: Tim Bunce [EMAIL PROTECTED]
Cc: Nathanial Hendler [EMAIL PROTECTED]; Mysql 
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, July 20, 2001 12:05 AM
Subject: Re: Perl Script: MySQL Slow Query Log Parser


 On Wed, Jun 27, 2001 at 01:45:27PM +0100, Tim Bunce wrote:
 
  You'll find mysqldumpslow (in the mysql distribution) does all that and
  much much more
  
  It's a pity that it's not mentioned in the online documentation
  since it's a _very_ useful tool.
 
 I've submitted a patch against the manual to correct that oversight.
 
 Jeremy
 -- 
 Jeremy D. Zawodny, [EMAIL PROTECTED]
 Technical Yahoo - Yahoo Finance
 Desk: (408) 349-7878   Fax: (408) 349-5454   Cell: (408) 685-5936 -- NEW
 
 MySQL 3.23.29: up 33 days, processed 263,361,083 queries (89/sec. avg)
 


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Perl Script: MySQL Slow Query Log Parser

2001-07-20 Thread Jeremy Zawodny

On Wed, Jun 27, 2001 at 01:45:27PM +0100, Tim Bunce wrote:

 You'll find mysqldumpslow (in the mysql distribution) does all that and
 much much more
 
 It's a pity that it's not mentioned in the online documentation
 since it's a _very_ useful tool.

I've submitted a patch against the manual to correct that oversight.

Jeremy
-- 
Jeremy D. Zawodny, [EMAIL PROTECTED]
Technical Yahoo - Yahoo Finance
Desk: (408) 349-7878   Fax: (408) 349-5454   Cell: (408) 685-5936 -- NEW

MySQL 3.23.29: up 33 days, processed 263,361,083 queries (89/sec. avg)

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Perl Script: MySQL Slow Query Log Parser

2001-06-27 Thread Tim Bunce

You'll find mysqldumpslow (in the mysql distribution) does all that and
much much more

It's a pity that it's not mentioned in the online documentation
since it's a _very_ useful tool.

Tim.

On Mon, Jun 25, 2001 at 11:59:59PM -0700, Nathanial Hendler wrote:
 I wrote a perl script that will parse slow_queries logs, and output some 
 useful information.  It's kind of hard to explain, but I'll try.  I wanted to 
 see what queries were taking a lot of time, and how often they were 
 happening.  I wrote a perl script that parses the log files, ignores queries 
 that take less than n seconds, and normalizes the queries and reports the 
 info for each queries sorted by query occurance.
 
 'normalize' meaning...
 
 this...
 
 SELECT * FROM ween WHERE pandy_fackler = 1;
 SELECT * FROM ween WHERE pandy_fackler = 15;
 
 becomes...
 
 SELECT * FROM ween WHERE pandy_fackler = XXX;
 
 this...
 
 SELECT names FROM things WHERE name LIKE '%wazoo%';
 SELECT names FROM things WHERE name LIKE '%tada%';
 
 becomes...
 
 SELECT names FROM things WHERE name LIKE 'XXX';
 
 This has proven to be a very interesting and useful tool.  You should DL it 
 and try it on your long_queries log file.
 
 Whoever runs mysql.com should put a copy on the website.  It might just be 
 the greatest thing ever (my program, not the website).
 
 For more info, and to get a copy, you can get it at:
 http://www.retards.org/mysql/index.php
 
 I'd like to hear people's thought on it.  I'm the only person to test it so 
 far, so it'd be nice to know that it works for other people.
 
 Thanks,
 Nathan Hendler
 Tucson, AZ USA
 http://retards.org/
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: Perl Script: MySQL Slow Query Log Parser

2001-06-27 Thread sean . odonnell

any idea where any sort of documentation/tutorial can be found?

-Original Message-
From: Tim Bunce [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 27, 2001 1:45 PM
To: Nathanial Hendler
Cc: Mysql; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Perl Script: MySQL Slow Query Log Parser


You'll find mysqldumpslow (in the mysql distribution) does all that and
much much more

It's a pity that it's not mentioned in the online documentation
since it's a _very_ useful tool.

Tim.

On Mon, Jun 25, 2001 at 11:59:59PM -0700, Nathanial Hendler wrote:
 I wrote a perl script that will parse slow_queries logs, and output some 
 useful information.  It's kind of hard to explain, but I'll try.  I wanted
to 
 see what queries were taking a lot of time, and how often they were 
 happening.  I wrote a perl script that parses the log files, ignores
queries 
 that take less than n seconds, and normalizes the queries and reports the 
 info for each queries sorted by query occurance.
 
 'normalize' meaning...
 
 this...
 
 SELECT * FROM ween WHERE pandy_fackler = 1;
 SELECT * FROM ween WHERE pandy_fackler = 15;
 
 becomes...
 
 SELECT * FROM ween WHERE pandy_fackler = XXX;
 
 this...
 
 SELECT names FROM things WHERE name LIKE '%wazoo%';
 SELECT names FROM things WHERE name LIKE '%tada%';
 
 becomes...
 
 SELECT names FROM things WHERE name LIKE 'XXX';
 
 This has proven to be a very interesting and useful tool.  You should DL
it 
 and try it on your long_queries log file.
 
 Whoever runs mysql.com should put a copy on the website.  It might just be

 the greatest thing ever (my program, not the website).
 
 For more info, and to get a copy, you can get it at:
 http://www.retards.org/mysql/index.php
 
 I'd like to hear people's thought on it.  I'm the only person to test it
so 
 far, so it'd be nice to know that it works for other people.
 
 Thanks,
 Nathan Hendler
 Tucson, AZ USA
 http://retards.org/
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re[2]: Perl Script: MySQL Slow Query Log Parser

2001-06-27 Thread Werner Stuerenburg

 You'll find mysqldumpslow (in the mysql distribution) does all that and
 much much more

Sorry, not on my server (MySQL 3.22.32).

 It's a pity that it's not mentioned in the online documentation
 since it's a _very_ useful tool.

http://www.mysql.com/udmsearch/search.php?q=mysqldumpslow

shows no results. How come?


-- 
Herzlich
Werner Stuerenburg

_
ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen
Tel 0(049) 5224-997 407 ยท Fax 0(049) 5224-997 409
http://pferdezeitung.de



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Perl Script: MySQL Slow Query Log Parser

2001-06-26 Thread Nathanial Hendler

I wrote a perl script that will parse slow_queries logs, and output some 
useful information.  It's kind of hard to explain, but I'll try.  I wanted to 
see what queries were taking a lot of time, and how often they were 
happening.  I wrote a perl script that parses the log files, ignores queries 
that take less than n seconds, and normalizes the queries and reports the 
info for each queries sorted by query occurance.

'normalize' meaning...

this...

SELECT * FROM ween WHERE pandy_fackler = 1;
SELECT * FROM ween WHERE pandy_fackler = 15;

becomes...

SELECT * FROM ween WHERE pandy_fackler = XXX;

this...

SELECT names FROM things WHERE name LIKE '%wazoo%';
SELECT names FROM things WHERE name LIKE '%tada%';

becomes...

SELECT names FROM things WHERE name LIKE 'XXX';

This has proven to be a very interesting and useful tool.  You should DL it 
and try it on your long_queries log file.

Whoever runs mysql.com should put a copy on the website.  It might just be 
the greatest thing ever (my program, not the website).

For more info, and to get a copy, you can get it at:
http://www.retards.org/mysql/index.php

I'd like to hear people's thought on it.  I'm the only person to test it so 
far, so it'd be nice to know that it works for other people.

Thanks,
Nathan Hendler
Tucson, AZ USA
http://retards.org/

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php