Chinaunix首页 | 论坛 | 博客
  • 博客访问: 5286459
  • 博文数量: 1144
  • 博客积分: 11974
  • 博客等级: 上将
  • 技术积分: 12312
  • 用 户 组: 普通用户
  • 注册时间: 2005-04-13 20:06
文章存档

2017年(2)

2016年(14)

2015年(10)

2014年(28)

2013年(23)

2012年(29)

2011年(53)

2010年(86)

2009年(83)

2008年(43)

2007年(153)

2006年(575)

2005年(45)

分类: Mysql/postgreSQL

2011-11-08 06:34:40

在业务繁忙的时候我们需要创建索引,此时数据有DML操作,这时候我们如何做那?这时候选项就有了用武之地。   
        create xx on table (xx) online
          oracle的官方文档讲述如下

        You can create and rebuild indexes online. This enables you to update base tables at the same time you are building or rebuilding indexes on that table. You can perform. DML operations while the index build is taking place, but DDL operations are not allowed. Parallel execution is not supported when creating or rebuilding an index online.

        我们知道,在创建索引的时候,要为索引分配空间和索引数据,我们不加online的时候就会有DML,DDL锁,但是加了online,则DML锁没有了,只有DDL锁。这样就不会阻塞其它的用户的操作,顺利达到你创建索引的目的。

阅读(1143) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~