ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Online Rebuild of Indexes[adakia]

Online Rebuild of Indexes[adakia]

原创 Linux操作系统 作者:jlandzpa 时间:2019-04-06 17:54:05 0 删除 编辑

If you must create an index on a large and busy table which cannot suffer any downtime, then you can build this index without interrupting the availability of this table.

The command ...

CREATE INDEX index-name ON table-name (column-name) ONLINE;

... will create the index without interrupting the availability of the table.

Note, that NO downtime is experienced when rebuilding an index online. All DML operations may continue without interruption. This operation works on partitioned, nonpartitioned, and index-organized tables with B*-tree indexes.

Locks are briefly placed on the table during the prepare phase to place entries in the data dictionary and to create the index structure. Rebuilding an index online requires double the space of the current index.The table is offline briefly during the prepare and merge phases. Bitmap, cluster, and secondary indexes that are on index-organized tables may not be rebuilt.


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/936/viewspace-60589/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2001-10-12

  • 博文量
    240
  • 访问量
    200934