zoukankan      html  css  js  c++  java
  • SQL Server如何查看SQL语句的执行时间 (zz)


    IS2120@CSDN.BG57IV3 SQL Server数据库中,如何才能查看SQL 语句的执行时间呢?本文将为您介绍查询方法,供您参考,希望对您能够有所帮助。 1. 下面这种是SQL Server中比较简单的查询SQL 语句执行时间方法,通过查询前的时间和查询后的时间差来计算的: declare @begin_date datetime declare @end_date datetime select @begin_date = getdate() <这里写上你的语句...> select @end_date = getdate() select datediff(ms,@begin_date,@end_date) as '用时/毫秒' //z 2012-08-24 19:47:10 IS2120@csdn.T1731956970 2:下面这种方法比较全面,将执行每个语句时采取的步骤作为行集返回,通过层次结构树的形式展示出来 set statistics profile on set statistics io on set statistics time on go <这里写上你的语句...> go set statistics profile off set statistics io off set statistics time off //z 2012-08-24 19:47:10 IS2120@csdn.T1731956970IS2120@CSDN.BG57IV3

  • 相关阅读:
    99年人民币冠号大全
    9910的5种水印冠号发行量分布图
    儿童、青少年长身高的注意事项
    钱币评级流程与方法
    99版人民币收藏价值分析
    四、五版币冠字号发行量统计排行
    如何收藏第四套人民币大全套
    第四套荧光钞大全介绍
    小程序加载中提示实现
    微信小程序navigateBack如何带参数
  • 原文地址:https://www.cnblogs.com/IS2120/p/6745842.html
Copyright © 2011-2022 走看看