兴国资源网 Design By www.nnzcdc.com

1:下面这种是比较简单的查询方法,通过查询前的时间和查询后的时间差来计算的
复制代码 代码如下:
declare @begin_date datetime
declare @end_date datetime
select @begin_date = getdate()
<这里写上你的语句...>
select @end_date = getdate()
select datediff(ms,@begin_date,@end_date) as '用时/毫秒'


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

有时候我们需要知道一段SQL语句执行的时间有多长。下面是其中一种办法。

declare @preDate Datetime
select @preDate = getdate()
print @preDate
select datepart(ms,@preDate) as ms, datepart(ss,@preDate) as second,datepart(mi,@preDate) as minute

go
--需要测试的SQL语句
go

declare @preDate Datetime
SELECT @preDate= getdate()
select datepart(ms,@preDate) as ms, datepart(ss,@preDate) as second,datepart(mi,@preDate) as minute

这样可以知道你的语句到底运行了多少毫秒。

兴国资源网 Design By www.nnzcdc.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
兴国资源网 Design By www.nnzcdc.com

RTX 5090要首发 性能要翻倍!三星展示GDDR7显存

三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。

首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。

据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。