1.
set statistics time on
go
xxxx
go
set statistics time off
2.
DECLARE @begin dateTime
DECLARE @end dateTime
SET @begin=getdate();
BEGIN
xxxx
end
set @end=getdate();
SELECT datediff(ms,@begin,@end) as 'Elapsed Time'
3. 也可以设置Query-Query options