互联网服务数据库

reorg table后是否还需要reorg indexes

对于非分区表进行reorg后,是否还需要专门对索引进行reorg?我认为,reorg一个非分区表后,索引在reorg table之后会被重建。但看到好多系统数据库维护的脚本中,经常出现reorg table ,之后再reorg indexes all for table tabname,因此感到疑惑,求一个准确答复。...显示全部

对于非分区表进行reorg后,是否还需要专门对索引进行reorg?

我认为,reorg一个非分区表后,索引在reorg table之后会被重建。

但看到好多系统数据库维护的脚本中,经常出现reorg table ,之后再reorg indexes all for table tabname,因此感到疑惑,求一个准确答复。

收起
参与8

返回welyngj的回答

welyngjwelyngj数据仓库工程师ss

A classic table reorganization (offline reorganization) rebuilds the indexes during the last phase of the reorganization. When more than one temporary table space exists, it is possible that a temporary table space in addition to the one specified on the REORG TABLE command may be utilized for additional sorts that can accompanying table reorg processing. However, the inplace table reorganization (online reorganization) does not rebuild the indexes. It is recommended that you issue a REORG INDEXES command after the completion of an inplace table reorganization. An inplace table reorganization is asynchronous, therefore care must be taken to ensure that the inplace table reorganization is complete before issuing the REORG INDEXES command. Issuing the REORG INDEXES command before the inplace table reorganization is complete, might cause the reorganization to fail (SQLCODE -2219).

事业单位 · 2016-06-12
浏览1433

回答者

welyngj
数据仓库工程师ss

welyngj 最近回答过的问题

回答状态

  • 发布时间:2016-06-12
  • 关注会员:2 人
  • 回答浏览:1433
  • X社区推广