http://www.cnblogs.com/happyday56/archive/2009/09/10/1564144.html
set showplan_text on
go
select exported,money,count(1) num
from card
where IsGived = 1
group by exported,money;
go
set showplan_text off
go
SET STATISTICS TIME ON
GO
SELECT COUNT(*) FROM titleauthers
GO
SET STATISTICS TIME OFF
GO
SET STATISTICS IO ON
GO
SELECT COUNT(*) FROM employees
GO
SET STATISTICS IO OFF
GO
SET NOEXEC{ ON | OFF}: 检查你的Transact-SQL代码的语法,包括编译该代码但不执行。当使用延迟名字解析时,这对检查一个查询语句的语法是很有用的。即,当一个表还没有创建时,你就可以检查基于该表的查询语句的语法。
SET FMTONLY{ ON | OFF }:仅向客户端返回查询的元数据。对于SELECT语句,通常仅返回列头。
SET PARSEONLY { ON | OFF }:检查你的Transact-SQL代码的语法,但不编译或执行该代码。