zoukankan      html  css  js  c++  java
  • 表上有事务,online 创建索引会等待?

    表上有事务,创建索引:
    [oracle@yyjk ~]$ sqlplus tlcbuser/tlcbuser
    
    SQL*Plus: Release 11.2.0.4.0 Production on 星期三 8月 22 08:27:41 2018
    
    Copyright (c) 1982, 2013, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
    SQL> set linesize 200
    SQL> set pagesize 200
    SQL> select * from v$mystat where rownum<2;
    
           SID STATISTIC#       VALUE
    ---------- ---------- ----------
           143        0           0
    
    SQL> create table test_index as select owner,object_id,object_name,created from dba_objects;
    
    Table created.
    
    SQL> 
    
    SQL>  insert into test_index values ('aa','11','aa',sysdate);
    
    1 row created.
    
    SQL> 
    
    
    
    SQL> create index test_index_idx1 on test_index(object_id) online;
    
    
    SQL> select * from v$mystat where rownum<2;
    
           SID STATISTIC#       VALUE
    ---------- ---------- ----------
        30        0           0
    
    SQL> desc test_index
     Name                                                           Null?    Type
     ----------------------------------------------------------------------------------------------------------------- -------- ----------------------------------------------------------------------------
     OWNER                                                                VARCHAR2(30)
     OBJECT_ID                                                            NUMBER
     OBJECT_NAME                                                            VARCHAR2(128)
     CREATED    
    
           SESSION_ID    SQL_ID    MACHINE    BLOCKING_SESSION    SAMPLE_TIME    MODULE    PROGRAM    EVENT    SQL_TEXT    SQL_FULLTEXT
    1    30    31w9z6bn4gq6r    yyjk    143    22-8月 -18 08.48.19.084 上午    SQL*Plus    sqlplus@yyjk (TNS V1-V3)    enq: TX - row lock contention    create index test_index_idx1 on test_index(object_id) online    <CLOB>
    2    30    31w9z6bn4gq6r    yyjk    143    22-8月 -18 08.48.18.084 上午    SQL*Plus    sqlplus@yyjk (TNS V1-V3)    enq: TX - row lock contention    create index test_index_idx1 on test_index(object_id) online    <CLOB>
    3    30    31w9z6bn4gq6r    yyjk    143    22-8月 -18 08.48.17.084 上午    SQL*Plus    sqlplus@yyjk (TNS V1-V3)    enq: TX - row lock contention    create index test_index_idx1 on test_index(object_id) online    <CLOB>
    4    30    31w9z6bn4gq6r    yyjk    143    22-8月 -18 08.48.16.084 上午    SQL*Plus    sqlplus@yyjk (TNS V1-V3)    enq: TX - row lock contention    create index test_index_idx1 on test_index(object_id) online    <CLOB>
    5    30    31w9z6bn4gq6r    yyjk    143    22-8月 -18 08.48.15.084 上午    SQL*Plus    sqlplus@yyjk (TNS V1-V3)    enq: TX - row lock contention    create index test_index_idx1 on test_index(object_id) online    <CLOB>
    6    30    31w9z6bn4gq6r    yyjk    143    22-8月 -18 08.48.14.084 上午    SQL*Plus    sqlplus@yyjk (TNS V1-V3)    enq: TX - row lock contention    create index test_index_idx1 on test_index(object_id) online    <CLOB>
  • 相关阅读:
    常见前端面试题CSS部分
    window.location
    实时时间设置
    常用兼容处理
    背景淡入淡出切换
    常用插件
    PHP文件处理函数
    PHP的数据处理函数二(数组)
    php的数据处理函数一(字符串)
    PHP环境搭建(phpstudy)
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13349107.html
Copyright © 2011-2022 走看看