我看到一个类似的问题,询问如何监视备份/恢复操作的进度: Is there a SQL script that I can use to determine the progress of a SQL Server backup or restore process?个
I would like to know if there's a similar query/way to see how much time the query has left until it will end.
我看到一个类似的问题,询问如何监视备份/恢复操作的进度: Is there a SQL script that I can use to determine the progress of a SQL Server backup or restore process?个
I would like to know if there's a similar query/way to see how much time the query has left until it will end.
没有办法知道还有多少时间.查询的运行时间取决于实际查询本身之外的许多事情:锁定/阻止其他查询、其他消耗资源的进程(CPU/磁盘使用)、操作系统、网络等.如果您的5分钟查询正在运行,而其他人启动了一个大报告,您的查询现在可能会运行5:30.如果某人开始下载一个大文件并占用所有网络带宽怎么办?如果操作系统决定在后台执行某些操作,等等,直到返回所有行,查询才完成,但它可以在可变的时间范围内运行.