重建索引
来源:互联网 发布:stc单片机选型 编辑:程序博客网 时间:2024/04/29 06:58
create table tbTest(rownum int identity(1,1),id varchar(100),date datetime)
go
create index index_id on tbTest(id)
go
declare @i int
set @i=1
while @i<10
begin
insert into tbTest(id,date)
select newid(),getdate() from syscolumns
delete from tbTest where rownum%2=0
set @i=@i+1
end
go
select * from tbtest
SELECT avg_fragmentation_in_percent FROM sys.dm_db_index_physical_stats (DB_ID(), OBJECT_ID(N'tbTest'),
NULL, NULL, NULL) AS a JOIN sys.indexes AS b ON
a.object_id = b.object_id AND a.index_id = b.index_id where name='index_id'
alter index index_id on tbTest rebuild
go
- 重建索引
- 索引重建
- 重建索引
- 索引重建
- 重建索引
- 重建索引
- 重建索引
- 重建索引
- 索引重建
- 重建索引
- 重建索引
- 合并索引和重建索引
- 索引损坏与重建索引
- 主键、外键、索引、重建索引
- 在线重建索引
- 批量自动重建索引
- 重建对象索引
- 什么时候需要重建索引
- 初窥Windows内核——学习Windows Research Kernel手记(三)
- 闲来无事
- 云彩的渲染(转)
- java代码优化编程(二)
- 怎样理解封装,继承,多态!三者的区别?
- 重建索引
- 冬至
- 使用.net开发基于MapX的地理信息系统-鹰眼图模块
- 在MapXtreme2004地图中建一个显示小车的图层
- 怎样在WORD中,删除表格但保留表格中得文字在对应得位置
- GPS小车移动应用程序MapXtreme2004
- 使用多维分割来改善分析服务性能
- 解决RHEL5上无法添加删除程序的问题
- 管理多维数据库的分区