12
返回列表 发新帖
楼主: tolywang

[笔记] 关于rebuild index online 及drop index后重建问题

[复制链接]
论坛徽章:
9
数据库板块每日发贴之星
日期:2006-09-06 01:01:55数据库板块每日发贴之星
日期:2006-09-07 01:02:41数据库板块每日发贴之星
日期:2006-09-23 01:02:09数据库板块每日发贴之星
日期:2006-09-26 01:03:58数据库板块每日发贴之星
日期:2006-10-06 01:02:42数据库板块每日发贴之星
日期:2006-10-08 01:02:15数据库板块每日发贴之星
日期:2006-10-09 01:02:43授权会员
日期:2006-12-23 10:14:58会员2007贡献徽章
日期:2007-09-26 18:42:10
11#
发表于 2006-9-24 16:25 | 只看该作者
等受教

使用道具 举报

回复
论坛徽章:
63
19周年集字徽章-19
日期:2020-09-23 02:43:002012新春纪念徽章
日期:2012-02-13 15:12:092012新春纪念徽章
日期:2012-01-04 11:49:54ITPUB十周年纪念徽章
日期:2011-11-01 16:20:28现任管理团队成员
日期:2011-05-07 01:45:082011新春纪念徽章
日期:2011-02-18 11:42:472011新春纪念徽章
日期:2011-01-25 15:42:562011新春纪念徽章
日期:2011-01-25 15:42:332011新春纪念徽章
日期:2011-01-25 15:42:152011新春纪念徽章
日期:2011-01-25 15:41:50
12#
发表于 2006-9-24 20:28 | 只看该作者
craete index ...  Oracle will scan the whole table for the data to build the index.

alter index ... rebuild oracle takes the data already in the index and just reorganizes it.
The orginal table is not scanned again for data guring this rebuild process.

使用道具 举报

回复
论坛徽章:
63
19周年集字徽章-19
日期:2020-09-23 02:43:002012新春纪念徽章
日期:2012-02-13 15:12:092012新春纪念徽章
日期:2012-01-04 11:49:54ITPUB十周年纪念徽章
日期:2011-11-01 16:20:28现任管理团队成员
日期:2011-05-07 01:45:082011新春纪念徽章
日期:2011-02-18 11:42:472011新春纪念徽章
日期:2011-01-25 15:42:562011新春纪念徽章
日期:2011-01-25 15:42:332011新春纪念徽章
日期:2011-01-25 15:42:152011新春纪念徽章
日期:2011-01-25 15:41:50
13#
发表于 2006-9-24 20:36 | 只看该作者
When creating a new index that is a subset of an existing index or when rebuilding an existing index with new storage characteristics, Oracle might use the existing index instead of the base table to improve the performance of the index build.


from Oracle9i Database Performance Tuning Guide and Reference

使用道具 举报

回复
论坛徽章:
1
ITPUB新首页上线纪念徽章
日期:2007-10-20 08:38:44
14#
发表于 2006-9-25 11:27 | 只看该作者
最初由 cc59 发布
[B]When creating a new index that is a subset of an existing index or when rebuilding an existing index with new storage characteristics, Oracle might use the existing index instead of the base table to improve the performance of the index build.


from Oracle9i Database Performance Tuning Guide and Reference [/B]


alter index  rebuid online  与alter index ....rebuild 是不同的!

使用道具 举报

回复
论坛徽章:
63
19周年集字徽章-19
日期:2020-09-23 02:43:002012新春纪念徽章
日期:2012-02-13 15:12:092012新春纪念徽章
日期:2012-01-04 11:49:54ITPUB十周年纪念徽章
日期:2011-11-01 16:20:28现任管理团队成员
日期:2011-05-07 01:45:082011新春纪念徽章
日期:2011-02-18 11:42:472011新春纪念徽章
日期:2011-01-25 15:42:562011新春纪念徽章
日期:2011-01-25 15:42:332011新春纪念徽章
日期:2011-01-25 15:42:152011新春纪念徽章
日期:2011-01-25 15:41:50
15#
发表于 2006-9-25 17:09 | 只看该作者
最初由 SONGHEFEI 发布
[B]

alter index  rebuid online  与alter index ....rebuild 是不同的! [/B]


我没有说这两一样

使用道具 举报

回复
论坛徽章:
131
2006年度最佳技术回答
日期:2007-01-24 12:58:48福特
日期:2013-10-24 13:57:422014年新春福章
日期:2014-02-18 16:41:11马上有车
日期:2014-02-18 16:41:11马上有车
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14马上有对象
日期:2014-02-19 11:55:14马上加薪
日期:2014-02-19 11:55:142013年新春福章
日期:2013-02-25 14:51:24
16#
发表于 2006-9-26 08:56 | 只看该作者
至少有几个不同
1。drop & create 的话,当前Table 无法使用该index ,可能会严重影响应用,只能在应用不需用到该 Index时使用 , 而 alter index .. rebuild online 则没有这个限制,只是会消耗DB资源,不至于严重影响应用

2。Drop & create 只需占用一份index的space , 不像alter index .. rebuild online ,会在创建过程中需要占用新老两个index的space, 在free space不足的环境中,也许只能选用Drop & create

3. 至于 alter index .. rebuild ,或者alter index .. rebuild online 是否会使用 INDEX SCAN 代替 TABLE SCAN ,似乎不同环境有不同的结果。(RBO状态下)
我的一套环境中,alter index .. rebuild  ==> INDEX FAST FULL SCAN
alter index .. rebuild  online==> TABLE FULL SCAN
而另一套,则是alter index .. rebuild  /alter index .. rebuild  online 都采用了TABLE FULL SCAN

使用道具 举报

回复
论坛徽章:
12
2011新春纪念徽章
日期:2011-02-18 11:42:48复活蛋
日期:2012-11-22 09:52:50奥运会纪念徽章:皮划艇静水
日期:2012-10-25 12:50:41ITPUB 11周年纪念徽章
日期:2012-10-09 18:14:48奥运会纪念徽章:花样游泳
日期:2012-08-14 15:39:30奥运会纪念徽章:现代五项
日期:2012-07-10 10:16:15奥运会纪念徽章:沙滩排球
日期:2012-06-26 15:04:08迷宫蛋
日期:2012-03-15 16:30:382012新春纪念徽章
日期:2012-01-04 11:56:01鲜花蛋
日期:2011-12-30 10:04:25
17#
发表于 2009-12-1 18:12 | 只看该作者
斑竹就是斑竹啊。
解释的很清楚...

使用道具 举报

回复

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

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表