Home » Performance » MySQL » How chjeck how long did my query took to complete ?
How chjeck how long did my query took to complete ? [message #1561] Thu, 26 July 2007 13:46 Go to next message
newtomysql  is currently offline newtomysql
Messages: 30
Registered: February 2007
Member
Dear All,
I have a client for mysql which give me the time it took to query but now is very doubtful. I have 2 machines on the same networking accessing the same database one is showing 360ms and the other is showing 5469ms ? Thus I am very confuse where can I verify which is the exact time ? Thanks.
Re: How chjeck how long did my query took to complete ? [message #1601 is a reply to message #1561 ] Thu, 16 August 2007 08:45 Go to previous messageGo to next message
Peter  is currently offline Peter
Messages: 405
Registered: August 2006
Senior Member
Super Guru
Where do you get these times in ms ?

It well may be there are some network differences or some time is spent on the client library.

You can see the time in MySQL Server slow query logs if you enable them, unfortunately by default it is 1sec resolution unless you apply our microsecond resolution patches.


Peter Zaitsev, MySQL Performance Expert
MySQL Performance Blog - http://www.mysqlperformanceblog.com
MySQL Consulting http://www.mysqlperformanceblog.com/mysql-consulting/
Re: How chjeck how long did my query took to complete ? [message #1613 is a reply to message #1601 ] Thu, 16 August 2007 10:47 Go to previous messageGo to next message
newtomysql  is currently offline newtomysql
Messages: 30
Registered: February 2007
Member
Dear Peter,
Let me explain I am using mysqlyog client. The problem is that both the pc's are on the same network. The best of all the pc with less specification gives a better than a pc which have a higher specification so this is where I am very doubtful ? Is there any other method where I can confirm on this ? Thanks.
Re: How chjeck how long did my query took to complete ? [message #1623 is a reply to message #1613 ] Thu, 16 August 2007 11:24 Go to previous messageGo to next message
Peter  is currently offline Peter
Messages: 405
Registered: August 2006
Senior Member
Super Guru
Try tunning it from mysql command line client at least.


Peter Zaitsev, MySQL Performance Expert
MySQL Performance Blog - http://www.mysqlperformanceblog.com
MySQL Consulting http://www.mysqlperformanceblog.com/mysql-consulting/
Re: How chjeck how long did my query took to complete ? [message #1624 is a reply to message #1623 ] Thu, 16 August 2007 11:25 Go to previous messageGo to next message
newtomysql  is currently offline newtomysql
Messages: 30
Registered: February 2007
Member
Dear Peter,
I am not clear about tuning it from mysql command ? Can help me with the details please ? How do I go about on this ? Thanks.
Re: How chjeck how long did my query took to complete ? [message #1627 is a reply to message #1624 ] Thu, 16 August 2007 11:49 Go to previous messageGo to next message
Peter  is currently offline Peter
Messages: 405
Registered: August 2006
Senior Member
Super Guru
Oh, That is a typo

Run it from mysql command line to see the times first.

The fact your boxes are on the same network do not guaranty they have the same connection speed - there can be packet loss and other issues.


Peter Zaitsev, MySQL Performance Expert
MySQL Performance Blog - http://www.mysqlperformanceblog.com
MySQL Consulting http://www.mysqlperformanceblog.com/mysql-consulting/
Re: How chjeck how long did my query took to complete ? [message #1629 is a reply to message #1627 ] Thu, 16 August 2007 12:04 Go to previous messageGo to next message
newtomysql  is currently offline newtomysql
Messages: 30
Registered: February 2007
Member
Dear Peter,
The server which I am trying to connect is on a remote location. So how can I connect using command line ? Another thing is that when I run on a command line will I be able to see the time it took ? Thanks.
Re: How chjeck how long did my query took to complete ? [message #1630 is a reply to message #1629 ] Thu, 16 August 2007 12:08 Go to previous messageGo to next message
Peter  is currently offline Peter
Messages: 405
Registered: August 2006
Senior Member
Super Guru
You really need to do some manual reading.
http://dev.mysql.com/doc/refman/5.0/en/mysql.html


Peter Zaitsev, MySQL Performance Expert
MySQL Performance Blog - http://www.mysqlperformanceblog.com
MySQL Consulting http://www.mysqlperformanceblog.com/mysql-consulting/
Re: How chjeck how long did my query took to complete ? [message #1632 is a reply to message #1630 ] Thu, 16 August 2007 12:47 Go to previous message
newtomysql  is currently offline newtomysql
Messages: 30
Registered: February 2007
Member
Dear Peter,
So beside connection speed what else you think can be causing my time to be different ? Ok I have gone through the manual. The problem the moment I open mysql command line client it ask for password. So I tried something like this


C:\Documents and Settings\Administrator>mysql remoteIP I typed
'mysql' is not recognized as an internal or extern
operable program or batch file.

Any help please ? I am new to all this. Thanks.
Previous Topic:Strange behaviour on RH4.0 with MySQL 5.037
Next Topic:Unable to store images into BLOB
Goto Forum:
  



Current Time: Fri Nov 21 00:52:20 EST 2008

Total time taken to generate the page: 0.02410 seconds
.:: Contact :: Home :: MySQL Support by Percona.com ::.

Powered by: FUDforum 2.7.5.
Copyright ©2001-2006 FUD Forum Bulletin Board Software

MySQL Performance | Forum authority Badge