mysql duration and fetch time mysql duration and fetch time mysql mysql

mysql duration and fetch time


Fetch time - measures how long transferring fetched results take, which has nothing to do with query execution. I would not consider it as sql query debugging/optimization option since fetch time depends on network connection, which itself does not have anything to do with query optimization. If fetch time is bottleneck then more likely there's some networking problem.

Note: fetch time may vary on each query execution.

Duration time - is the time that query needs to be executed. You should try to minimize it when optimizing performance of sql query.

Reference


Duration shows the time needed to execute the query and fetch is the time needed to read the result set (retrieve the data)

I am unsure about the microsecond option. If this is in regards to optimization, remember - "premature optimization is the root of all evil"


Execution time is time spent preparing the query and running the query AND The fetch time is time spent pulling-in the row results