sdusrz

SQL server中查看查询所用时间

 

 

 先记录执行前的时间,然后在记录执行Sql后的时间,然后做减法

declare @d datetime
set @d=getdate()
/*SQL脚本开始*/

select Top 1 *   FROM [SmartMachineReport1211].[dbo].[Pmt_CycleTime] where [AssessmentFlag]=0 order by IGBX_RECORD_TIME 

/*SQL脚本结束*/
select [语句执行花费时间(毫秒)]=datediff(ms,@d,getdate())

 

分类:

技术点:

相关文章:

  • 2021-11-11
  • 2021-06-21
  • 2021-12-03
  • 2021-12-05
  • 2022-12-23
  • 2021-12-03
  • 2021-12-18
猜你喜欢
  • 2022-12-23
  • 2021-12-18
  • 2021-11-22
  • 2022-12-23
  • 2021-12-13
  • 2021-12-03
相关资源
相似解决方案