PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > mysql.general > Monitoring and analysis tool
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Monitoring and analysis tool

Réponse
 
LinkBack Outils de la discussion
Vieux 16/12/2007, 07h06   #1
Daniel Caune
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Monitoring and analysis tool

Hi,

Our MySQL server used for our development environment is slowing down,
certainly because of a massive query execution by different processes.
We are trying to determine which kind of query is the most executed and
on which database instance(s).

We are quite novice in administrating MySQL. We imagine that we can
configure MySQL so that it logs every queries executed in its
queries.log file. However is there any analysis tool that would import
this log file and that would generate a complete report providing the
number of similar queries (same DML order on the same table) per
databases per minute?

P.S.: we are using mytop and innotop, but it seems that they don't
support such a feature. We see a lot of different queries executed
against MySQL but we can't figure out, which kind of queries is the most
executed, on which database.

Thanks,

--
Daniel
  Réponse avec citation
Vieux 16/12/2007, 09h52   #2
Mark Leith
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Monitoring and analysis tool

Daniel Caune wrote:
> Hi,
>
> Our MySQL server used for our development environment is slowing down,
> certainly because of a massive query execution by different processes.
> We are trying to determine which kind of query is the most executed and
> on which database instance(s).
>
> We are quite novice in administrating MySQL. We imagine that we can
> configure MySQL so that it logs every queries executed in its
> queries.log file. However is there any analysis tool that would import
> this log file and that would generate a complete report providing the
> number of similar queries (same DML order on the same table) per
> databases per minute?
>
> P.S.: we are using mytop and innotop, but it seems that they don't
> support such a feature. We see a lot of different queries executed
> against MySQL but we can't figure out, which kind of queries is the most
> executed, on which database.
>


Turn on the slow query log (log_slow_queries), set long_query_time to 1
(second), and then use the mysqldumpslow tool to aggregate all of the
slow queries:

[markleith@medusa:~/mysql/mysql-5.0-bk] $ mysqldumpslow --
Usage: mysqldumpslow [ OPTS... ] [ LOGS... ]

Parse and summarize the MySQL slow query log. Options are

--verbose verbose
--debug debug
-- 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

http://dev.mysql.com/doc/refman/5.0/...query-log.html

Regards

Mark

--
Mark Leith, Manager of Support, Americas
MySQL AB, www.mysql.com
Are you MySQL certified? www.mysql.com/certification

  Réponse avec citation
Vieux 16/12/2007, 17h37   #3
Daniel Caune
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut RE: Monitoring and analysis tool

> -----Message d'origine-----
> De: Mark Leith [mailto:mleith@mysql.com]
> Envoyé: dimanche, décembre 16, 2007 04:53
> À: Daniel Caune
> Cc: mysql@lists.mysql.com
> Objet: Re: Monitoring and analysis tool
>
> Daniel Caune wrote:
> > Hi,
> >
> > Our MySQL server used for our development environment is slowing down,
> > certainly because of a massive query execution by different processes.
> > We are trying to determine which kind of query is the most executed and
> > on which database instance(s).
> >
> > We are quite novice in administrating MySQL. We imagine that we can
> > configure MySQL so that it logs every queries executed in its
> > queries.log file. However is there any analysis tool that would import
> > this log file and that would generate a complete report providing the
> > number of similar queries (same DML order on the same table) per
> > databases per minute?
> >
> > P.S.: we are using mytop and innotop, but it seems that they don't
> > support such a feature. We see a lot of different queries executed
> > against MySQL but we can't figure out, which kind of queries is the most
> > executed, on which database.
> >

>
> Turn on the slow query log (log_slow_queries), set long_query_time to 1
> (second), and then use the mysqldumpslow tool to aggregate all of the
> slow queries:
>


Thanks. However how can I trace every queries run against MySQL traced into slow-queries.log in order to use the mysqldumpslow tool? "The minimum and default values of long_query_time are 1 and 10, respectively." It seems that I can't set 0 for long_query_time.

--
Daniel
  Réponse avec citation
Vieux 16/12/2007, 17h51   #4
Baron Schwartz
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Monitoring and analysis tool

Daniel,

On Dec 16, 2007 12:37 PM, Daniel Caune <daniel.caune@ubisoft.com> wrote:
> > -----Message d'origine-----
> > De: Mark Leith [mailto:mleith@mysql.com]
> > Envoyé: dimanche, décembre 16, 2007 04:53
> > À: Daniel Caune
> > Cc: mysql@lists.mysql.com
> > Objet: Re: Monitoring and analysis tool
> >
> > Daniel Caune wrote:
> > > Hi,
> > >
> > > Our MySQL server used for our development environment is slowing down,
> > > certainly because of a massive query execution by different processes..
> > > We are trying to determine which kind of query is the most executed and
> > > on which database instance(s).
> > >
> > > We are quite novice in administrating MySQL. We imagine that we can
> > > configure MySQL so that it logs every queries executed in its
> > > queries.log file. However is there any analysis tool that would import
> > > this log file and that would generate a complete report providing the
> > > number of similar queries (same DML order on the same table) per
> > > databases per minute?
> > >
> > > P.S.: we are using mytop and innotop, but it seems that they don't
> > > support such a feature. We see a lot of different queries executed
> > > against MySQL but we can't figure out, which kind of queries is the most
> > > executed, on which database.
> > >

> >
> > Turn on the slow query log (log_slow_queries), set long_query_time to 1
> > (second), and then use the mysqldumpslow tool to aggregate all of the
> > slow queries:
> >

>
> Thanks. However how can I trace every queries run against MySQL traced into slow-queries.log in order to use the mysqldumpslow tool? "The minimum and default values of long_query_time are 1 and 10, respectively." It seems that I can't set 0 for long_query_time.


Correct. But if you are willing to patch your server, you can:

http://www.mysqlperformanceblog.com/...l-performance/
  Réponse avec citation
Vieux 16/12/2007, 18h07   #5
Mark Leith
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Monitoring and analysis tool

Baron Schwartz wrote:
> Correct. But if you are willing to patch your server, you can:
>
> http://www.mysqlperformanceblog.com/...l-performance/
>


This is in 5.1 as well now

Regards

Mark

--
Mark Leith, Manager of Support, Americas
MySQL AB, www.mysql.com
Are you MySQL certified? www.mysql.com/certification

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 05h16.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,13201 seconds with 13 queries