如何获得执行某一存储过程或者SQL语句 10000次时的时间统计
展开全部
drop table loopData;
create table loopData(id int identity(1,1), dt datetime)
delete from loopData
declare @dt datetime, @count int
set @dt=getdate()
set @count = 0
while @count <= 10000
begin
insert into loopData(dt) select getdate()
set @count = @count + 1
end
print datediff(ss, @dt, getdate())
create table loopData(id int identity(1,1), dt datetime)
delete from loopData
declare @dt datetime, @count int
set @dt=getdate()
set @count = 0
while @count <= 10000
begin
insert into loopData(dt) select getdate()
set @count = @count + 1
end
print datediff(ss, @dt, getdate())
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询