mysql duration and fetch time

后端 未结 4 973
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-31 01:17

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 MySQ

相关标签:
4条回答
  • 2021-01-31 01:26

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

    0 讨论(0)
  • 2021-01-31 01:32

    About the microsecond, try to enable it in the Preferences menu, and I also got a question about the duration and fetch time before, now I seems get the answer that the duration is the execution time of the query, and the fetch is retrieve the result and send them to wherever you want. For example, I get a query which duration time is 0.078 but will take 60 secs to send the data back to my website.

    0 讨论(0)
  • 2021-01-31 01:44

    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"

    0 讨论(0)
  • 2021-01-31 01:49

    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

    0 讨论(0)
提交回复
热议问题