测试SQL语句执行时间

一、第一种测试 

declare @d datetime

set @d=getdate()
select COUNT(0) from Disease
--select * from Disease
select [语句执行花费时间(毫秒)]=datediff(ms,@d,getdate())

 

 http://space.itpub.net/9671084/viewspace-255613

聚集索引是如此的重要和珍贵,所以笔者总结了一下,一定要将聚集索引建立在:
1、您最频繁使用的、用以缩小查询范围的字段上;
2、您最频繁使用的、需要排序的字段上。 

 

二、第二种测试 

set statistics profile on
set statistics time on 
go
SQL语句
go
set statistics profile off
set statistics time off 

 

and LENGTH(password)='6 
and LEFT(password,1)='m  
union Select 1,username,password from user

into outfile 'c:/file.txt   

转载于:https://www.cnblogs.com/leeolevis/archive/2011/04/27/1962552.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值