Thanks a lot for your reply. I need know SQLs that consume most resources(CPU time, disk IO etc.) of database server.
Sometimes the same SQL could be executed many times to hold most time of CPU. Sometimes executed only one time. Maybe I can say I am looking for something like STATSPACK of Oracle for MySQL. Regards, Gu Lei ----- Original Message ----- From: "Daniel da Veiga" <[EMAIL PROTECTED]> To: <mysql@lists.mysql.com> Sent: Tuesday, August 08, 2006 12:43 AM Subject: Re: MySQL SQL statistics > On 8/7/06, 古雷 <[EMAIL PROTECTED]> wrote: >> Hello everyone: >> >> I want to get some SQL statistics including executions, CPU time for each >> SQL Statement. > > The number of each type of query can be found using the "show status > like 'Com%';", I don't believe there's a way to know how much CPU time > MySQL is using for each query, for once, it would be different on each > OS MySQL can run (there are a lot), also, it would take CPU time to > check that ;-). I can't see any advantage of knowing this... Depending > on your OS, you can check the whole MySQL process resources with > specific commands like "top" on *ix or CTRL+ALT+DEL on windows. > > -- > Daniel da Veiga > Computer Operator - RS - Brazil > -----BEGIN GEEK CODE BLOCK----- > Version: 3.1 > GCM/IT/P/O d-? s:- a? C++$ UBLA++ P+ L++ E--- W+++$ N o+ K- w O M- V- > PS PE Y PGP- t+ 5 X+++ R+* tv b+ DI+++ D+ G+ e h+ r+ y++ > ------END GEEK CODE BLOCK------ > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] >