文章归档

index rebuild online处理过程

http://forums.oracle.com/forums/thread.jspa?messageID=4269655#4269655

In principle (for 10g):

Your rebuild tries to take an exclusive (or possibly share) lock on the table and gets stuck waiting for current transactions on the table to complete.
All current transactions on the table complete, all new ones are stuck behind the rebuild lock
The rebuild gets its lock, prepares the MV log, starts the rebuild [...]

表空间中的基于”xxxx.xxxx”的temporary对象说明与测试.

在创建大的索引,或者Rebuild大的索引以及使用CTAS创建大表,move大表的时候,我们经常可以看到一些纯粹数字表示(如”xxxx.xxxxx”)的类型为“TEMPORARY”的segment.之前我一直不清楚里面的两个数字是什么意思,曾经怀疑其与将要创建的object_id有某种关系, 前两天在 http://aprakash.wordpress.com/看到一个blog,说里面的数字是”filenumber.header_HEADERBLOCKNUMBER”,并且提供了比较详细的例子. 经过在我在测试环境的测试, 我觉得其更应该被表述为”header_file_number.header_block_number”.

在此特别感谢Anand与Hemant. 这篇文章的主要思想都是来自两位..

Segment name – Numeric
TEMPORARY Segments in Data/Index Tablespaces

1. 在Session 1中创建一个相对较大的表temp_obj. 同时在session 2中监控相应信息.

–Session 1>
09:30:52 SQL>
09:30:52 SQL> create table temp_obj tablespace users as
09:31:04 2 select a.*
09:31:04 3 from dba_objects a,dba_objects b
09:31:04 4 where rownum

–Session 2
09:30:56 SQL> l
1 select owner,segment_name,segment_type,header_file,header_block,blocks
[...]