analyze index時, validate structure和compute statistics的區別?

上一篇 / 下一篇  2008-03-27 10:41:18 / 个人分类:Oracle DB Manage

validate structure和compute statistics的區別?

analyze  index index1 validate structure:
analyze  index index1 compute statistics:

在分析索引的時候,一般會用到以上二個命令,那么這二個命令是用來干嘛呢?
analyze index index1 validate structure:
是用來分析索引的數據塊是否有壞塊,以及根據分析得到的數據(存放在index_stats)來判斷索引是否需要重新建立。
見:http://space.itpub.net/26684/viewspace-207197
validate structure有二中模式: online, offline, 默認是offline模式。
以offline模式分析時, 會對表加一個4級別的鎖(表共享),對run系統可能趙成一定的影響。
而online模式則沒有表lock的影響,但當以online模式分析時, 在視圖index_stats沒有統計信息。

analyze  index index1 compute statistics:是用來統計index的分析信息,來為CBO服務的。從9i開始,Oracle以建議使用dbms_stats package代替 analyze 了。

 


TAG:

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

日历

« 2008-08-30  
     12
3456789
10111213141516
17181920212223
24252627282930
31      

数据统计

  • 访问量: 1612
  • 日志数: 41
  • 建立时间: 2008-01-23
  • 更新时间: 2008-06-11

RSS订阅

Open Toolbar