mysql duration and fetch time

user1189851 picture user1189851 · Feb 24, 2012 · Viewed 53.2k times · Source

I am using MySQL workbench - What is the difference between duration and fetch times when a query is run?

Also is there a way I can enable the microsecond option in MySQL?

Answer

Leri picture Leri · May 7, 2014

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