ITPUB??ì3
12月微软Hyper-V虚拟化沙龙主题征集
ITPUB论坛 » Oracle数据库管理 » who knows the index building mechanism?

标题: [原创] who knows the index building mechanism?
离线 blue_or_white
初级会员



精华贴数 0
个人空间 0
技术积分 97 (17272)
社区积分 0 (1473136)
注册日期 2007-7-14
论坛徽章:2
2008北京奥运纪念徽章:沙滩排球2008北京奥运纪念徽章:拳击    
      

发表于 2008-9-28 21:00 
who knows the index building mechanism?

Is there any body know which mechanism Oracle uses to build an index.

for example:

a table A (a1, a2)has 1000 rows, I want to create an index idx_a1 on column a1.
Then how does oracle create the index?

Hypothesis 1:
Oracle extracts all the data in column a1,and put it all into the sort area(memory or temp space or both of them), after completed sorting, writes the sorted data into the permanent tablespace to build the index.

Hypothesis 2:
Oracle divides the data of column a1 into n parts(part1, part2, part3.....), then put data part1 into the sort area, after sorted , write the sorted data into the permanent tabelspace and them processes data part2 .......

Hypothesis 3:
..........


Who knows the actual mechanism Oracle using to build an index?
Any instruction,comment and discussion is welcome.

Thanks!

[ 本帖最后由 blue_or_white 于 2008-9-28 21:02 编辑 ]


只看该作者    顶部
离线 amtom



精华贴数 0
个人空间 0
技术积分 42 (32484)
社区积分 0 (1874788)
注册日期 2008-9-27
论坛徽章:0
      
      

发表于 2008-9-28 21:59 
This is a complex problem.


只看该作者    顶部
离线 waterbird1985
初级会员



精华贴数 0
个人空间 0
技术积分 41 (32537)
社区积分 0 (1401420)
注册日期 2007-5-29
论坛徽章:0
      
      

发表于 2008-9-28 22:25 
Think it easiy, if it is hypothesis 2, why do we need so many temp usage to build a index?


只看该作者    顶部
离线 blue_or_white
初级会员



精华贴数 0
个人空间 0
技术积分 97 (17272)
社区积分 0 (1473136)
注册日期 2007-7-14
论坛徽章:2
2008北京奥运纪念徽章:沙滩排球2008北京奥运纪念徽章:拳击    
      

发表于 2008-9-28 22:39 


QUOTE:
原帖由 waterbird1985 于 2008-9-28 22:25 发表
Think it easiy, if it is hypothesis 2, why do we need so many temp usage to build a index?

From this poit, we may be able to reject the Hypothesis 2, but what about other hypothesises?
Or what is the real mechanism?
Thanks for your comment.


只看该作者    顶部
离线 waterbird1985
初级会员



精华贴数 0
个人空间 0
技术积分 41 (32537)
社区积分 0 (1401420)
注册日期 2007-5-29
论坛徽章:0
      
      

发表于 2008-9-29 01:49 
What you think is correct, oracle will sort all key columns in sort segments, and build root block, then build leaf, build branch if needed, finally you'll get a tree. JL talked about this in his Practical 8i book.


只看该作者    顶部
离线 blue_or_white
初级会员



精华贴数 0
个人空间 0
技术积分 97 (17272)
社区积分 0 (1473136)
注册日期 2007-7-14
论坛徽章:2
2008北京奥运纪念徽章:沙滩排球2008北京奥运纪念徽章:拳击    
      

发表于 2008-9-29 10:09 


QUOTE:
原帖由 waterbird1985 于 2008-9-29 01:49 发表
What you think is correct, oracle will sort all key columns in sort segments, and build root block, then build leaf, build branch if needed, finally you'll get a tree. JL talked about this in his Practical 8i book.

Thanks for your information.That helps me a lot.

Since 9i/10g is more popular than 8i, so I rarely focus on the book about oracle 8i, but it turn out that I am wrong.
And do you have the electronic copy of this book(its full name is Practical Oracle 8i, right)? What about uploading it to the forum? I think it is very helpfull for the member of this community.
Thanks!

[ 本帖最后由 blue_or_white 于 2008-9-29 10:20 编辑 ]


只看该作者    顶部
 
    

相关内容


CopyRight 1999-2006 itpub.net All Right Reserved.
北京皓辰广域网络信息技术有限公司. 版权所有
E-mail:Webmaster@itpub.net
京ICP证:010037号 联系我们 法律顾问