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>
  • 相关阅读:
    测试页面content No cp
    视频流开发 视频传输编解码协议规范 视频监控AI实现视频监控自动目标识别回放定位 AI 无人机 机器人 高空天眼等 图景处理
    web安全 waf相关
    Jemeter数据库压力测试场景模拟应用备忘
    C++工具库收集记录
    gulp自动部署
    CSS实现图片与文本的居中对齐的常见方式
    flexible.js 移动端自适应方案及flex布局原理
    从源头细说Webpack与Gulp
    webstorm 2020.2永久破解激活码 安装教程(Windows Mac Linux)
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13349107.html
Copyright © 2011-2022 走看看