Mysql duration and sample time

I am using MySQL workbench - What is the difference between the duration and the sampling time when executing a query?

Also is there a way to enable microsecond function in MySQL?

+49
mysql mysql-workbench
Feb 24 2018-12-12T00:
source share
4 answers

Sampling time - determines how long the results are transferred, which has nothing to do with the query. I would not consider it as a function of debugging / optimizing a sql query, since the sampling time depends on the network connection, which in itself has nothing to do with query optimization. If the sampling time is a bottleneck, then most likely there are network problems.

Note. Sampling time may change each time the query is executed.

Duration is the time that the request should be completed. You should try to minimize it while optimizing SQL query performance.

Link

+83
May 7 '14 at 10:19
source share

Duration shows the time it takes to complete the query, and fetching is the time it takes to read the result set (getting data)

I'm not sure about the microsecond option. If it comes to optimization, remember - "premature optimization is the root of all evil"

+12
Feb 24 2018-12-12T00:
source share

In a microsecond, try turning it on in the "Settings" menu, and I also asked about the duration and time of the sample earlier, now, it seems, I get the answer that the duration is the time it takes to execute the request and the sample retrieves the result and sends them to where you want . For example, I receive a request whose duration is 0.078, but takes 60 seconds to send data to my site.

0
Aug 09 '13 at 14:50
source share

Execution time is the time taken to prepare the request and the execution of the request AND Sampling time is the time taken to retrieve the results of the row

0
May 7 '14 at 10:08
source share



All Articles