rebuild索引时是否需要使用TEMP表空间?

[复制链接]
查看11 | 回复9 | 2005-7-16 18:49:11 | 显示全部楼层 |阅读模式
rebuild素引时,会用到已经存在的索引,是不是应该不需要使用TEMP表空间呢?
如果对一张表作过数据清理,对该表执行move操作后再次rebuild索引呢?这时是否需要排序呢?
回复

使用道具 举报

千问 | 2005-7-16 18:49:11 | 显示全部楼层
1 如果是online方式,肯定要用排序
2 如果不是online方式,则不需要排序.
3 要排序.
回复

使用道具 举报

千问 | 2005-7-16 18:49:11 | 显示全部楼层
move后,索引无效,必须重新索引。
如果是rebuild,应该执行计划是全索引扫描。
至于是否使用索引,我不是很清楚。
回复

使用道具 举报

千问 | 2005-7-16 18:49:11 | 显示全部楼层
show parameter sort_area_size
show parameter pga_aggregate_target
回复

使用道具 举报

千问 | 2005-7-16 18:49:11 | 显示全部楼层
9i的fundamentals上说重建索引是不需要排序的。但是我只是不知道在move过表以后的重建索引是否需要排序,因为感觉这时索引已经失效了。现在手头上没有什么大表可以测试一下
Index rebuilds have the following characteristics:
? A new index is built using an existing index as the data source.
? Sorts are not needed when an index is built using an existing index, resulting in better
performance.
? The old index is deleted after the new index is built. During the rebuild, sufficient space
is needed to accommodate both the old and the new index in their respective
tablespaces.
? The resulting index does not contain any deleted entries. Therefore, this index uses
space more efficiently.
? Queries can continue to use the existing index while the new index is being built.
回复

使用道具 举报

千问 | 2005-7-16 18:49:11 | 显示全部楼层
up一下
回复

使用道具 举报

千问 | 2005-7-16 18:49:11 | 显示全部楼层
最初由 xzh2000 发布
[B]1 如果是online方式,肯定要用排序
2 如果不是online方式,则不需要排序.
3 要排序. [/B]

老和尚,是这样的吗?
为什么只有ONLINE的索引REBUILD的时候才肯定用到排序
我认为索引就一定要用到排序,而REBUILD的时候就是重新索引,那也是一定要用到排序,这和是不是ONLIE有关系吗?
请和尚兄多多指点
回复

使用道具 举报

千问 | 2005-7-16 18:49:11 | 显示全部楼层
加了online选项不是用已经存在的索引
回复

使用道具 举报

千问 | 2005-7-16 18:49:11 | 显示全部楼层
应该用到的。
回复

使用道具 举报

千问 | 2005-7-16 18:49:11 | 显示全部楼层
把临时文件给OFFLINE,测试以下就知道了!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行