一.插入删除索引,测速
declare @d datetime
set @d=getdate()
select * from CVTUser
select [语句执行花费时间(毫秒)]=datediff(ms,@d,getdate())
update TestRelation set dif4=0,dif5=0
drop index CVTUser.IX_UserSchool
create CLUSTERED index IX_UserType on CVTUser(userType)
create NONCLUSTERED index IX_UserSchool on CVTUser(userSchool)
(待续。。。)
本文介绍了一种通过创建和删除不同类型的SQL索引来优化数据库查询性能的方法。具体操作包括建立聚集索引和非聚集索引,并测量这些操作对查询执行时间的影响。
1787

被折叠的 条评论
为什么被折叠?



