执行计划是CTRL + L是吧,里面没有时间显示啊 select getdate()应该怎么用呢?比如我有一个查询,是一起运行吗? select getdate() Distinct name from TEST A Where Not Exists( Select * from TEST Where Name=A.Name And fenshu<=80) 结果不对啊?我错在哪了
set statistics time on select * from tb --换成你要测的语句
/* 看消息:(0 row(s) affected)SQL Server Execution Times: CPU time = 0 ms, elapsed time = 1 ms. */
select getdate()
你的语句
select getdate()
这样看执行的时间
-- 你的语句
select datediff(ss,@date1,getdate())
select getdate()应该怎么用呢?比如我有一个查询,是一起运行吗?
select getdate()
Distinct name from TEST A Where Not Exists(
Select * from TEST Where Name=A.Name And fenshu<=80)
结果不对啊?我错在哪了
select * from tb --换成你要测的语句
/*
看消息:(0 row(s) affected)SQL Server Execution Times:
CPU time = 0 ms, elapsed time = 1 ms.
*/