declare @starttime datetime
set @starttime=getdate()
--查这张表中行
print datediff(ms,@starttime,getdate())得到毫秒