Using the GUI

ID #1129

How shall I understand the 'query execution time' that SQLyog gives me?

 

SQLyog displays 'query execution time' for each query in three different places: The STATUS bar/line, the MESSAGES tab and the HISTORY tab.


Let us explain what they are and how they are used (note: This is as of SQLyog version 7.1)

To get this TIME information SQLyog makes use of three different TIMESTAMPs


1) First TIMESTAMP (T_1): this is collected when you click 'execute' and the query is sent to the server.

2) Second TIMESTAMP (T_2): After receiving it, the server queues it, executes it and returns a status flag (whether execution was successful or not). When SQLyog receives this status flag the second TIMESTAMP is collected.

3) Third TIMESTAMP (T_3): After receiving, formatting and printing those data to the screen the third TIMESTAMP is collected.


The 3 above timestamps are used for calculations:

* execution time: T_2 - T_1
* transfer time: T_3 - T_2
* total time: T_3 - T_1

In MESSAGES tab all three calculated times are displayed
In HISTORY tab only the calculated execution time is displayed
In proces line total time and execution time is displayed


Note that all those TIMESTAMPs are collected from the client system. There is generally no way for SQLyog to get the Server Time information. If you need that information and need it to be exact, you need to get it from Server logs. However with a reasonable fast connection the data calculated as described are pretty close. Also note that the transfer time displayed will contain the very small (mostly neglible) overhead caused by internal SQLyog processing.

(However Starting from version 5.0.37 MySQL supports 'query profiling' and it is in principle possible to get the information from the server. Currently you will need to execute the appropriate 'query profiling' SQL commands from the SQL editor. We may decide to provide GUI support for this at a later stage, but currently it is not supported).


Also there is a modification for HTTP-tunneled connections: With HTTP-tunnel note that only the total time displayed in all three places as the tunneller file is not able to collect timestamps from neither remote or local system. And it does not make sense in our opinion to include HTTP-related transfer overhead in the information displayed. As a consequence the time displayed in HISTORY for HTTP-tunnelled connections is the total time.


Tags: -

Related entries:

Last update: 2008-09-19 14:34
Author: Peter Laursen
Revision: 1.0

Digg it! Print this record Send FAQ to a friend Show this as PDF file
Propose a translation for Propose a translation for
Please rate this FAQ:

Average rating: 2.33 out of 5 (3 Votes )

completely useless 1 2 3 4 5 most valuable

You can comment this FAQ