关于mysql的Fetch Time 和 Duration Time

本文详细解析了SQL查询中Fetchtime与Durationtime的区别及意义。Fetchtime指的是数据在网络上的传输时间,而Durationtime则是SQL执行所需的时间。优化SQL性能时,应重点关注减少Durationtime。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

详见:http://blog.yemou.net/article/query/info/tytfjhfascvhzxcyt411

Stackowerflow 上关于这两个时间有人这样解释

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.

 

其实说通俗一些,fetch time 就是数据在网络上传输花费的时间,duration time是sql真正执行的时间

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值