在 oracle中创建索引时
有用create index online与不带online创建索引的区别是什么?
online状态创建索引有何好处? 谢谢!

解决方案 »

  1.   

    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.
      

  2.   

    online不索引到当前SQL的执行不带online的话,ORACLE会在创建索引时加上相关的锁,会阻塞其它对此表进行写操作的session
      

  3.   

    一般建立索引会引起锁表,不允许进行数据更新等DML操作;
    如果建立索引时指定关键字online,那么只会在表上加一个共享锁,仅不允许变更表的定义。
    但可以对数据进行修改。
      

  4.   

     online 会在创建索引和rebuilt索引的的时候允许DML操作,不设置online的话会影响DML操作 影响并发