zoukankan      html  css  js  c++  java
  • Oracle INITRANS和MAXTRANS

    create table A1
    (
      ID INTEGER
    )
    tablespace TEST_DATA
      pctfree 10
      pctused 40
      initrans 1
      maxtrans 255
      storage
      (
        initial 1
        next 1
        minextents 1
        maxextents unlimited
        pctincrease 0
      );
    
    INITRANS: 预先决定每个块头需要拥有的ITL条目,比如,INITRANS值设定为10,则为10个同时进行的事务提供空间。
    
    MAXTRANS:决定最多允许的ITL条目数。若MAXTRANS值设定为50,则最多允许50个同时事务。MAXTRANS的缺省值是255,Oracle 10g开始MAXTRANS定位255.
    
    即,即便指定了MAXTRANS的值,Oracle也会无视这些值,一直使用255.
    SQL> create table A2
    (
      ID INTEGER
    )
    tablespace TEST_DATA
      pctfree 10
      pctused 40
      initrans 100
      maxtrans 999
      storage
      (
        initial 1
        next 1
        minextents 1
        maxextents unlimited
        pctincrease 0
      );  2    3    4    5    6    7    8    9   10   11   12   13   14   15   16   17  
      maxtrans 999
               *
    ERROR at line 9:
    ORA-02209: invalid MAXTRANS option value
    
    提示maxtrans 999不正确,
    
    SQL> create table A2
    (
      ID INTEGER
    )
    tablespace TEST_DATA
      pctfree 10
      pctused 40
      initrans 100
      maxtrans 256
      storage
      (
        initial 1
        next 1
        minextents 1
        maxextents unlimited
        pctincrease 0
      );  2    3    4    5    6    7    8    9   10   11   12   13   14   15   16   17  
      maxtrans 256
               *
    ERROR at line 9:
    ORA-02209: invalid MAXTRANS option value
    
    经测试maxtrans 不能超过255
    SQL> create table A2
    (
      ID INTEGER
    )
    tablespace TEST_DATA
      pctfree 10
      pctused 40
      initrans 100
      maxtrans 200
      storage
      (
        initial 1
        next 1
        minextents 1
        maxextents unlimited
        pctincrease 0
      );  2    3    4    5    6    7    8    9   10   11   12   13   14   15   16   17  
    
    Table created.
    
    SQL> select owner,table_name,INI_TRANS,MAX_TRANS from dba_tables where owner='TEST' and  table_name='A2';
    
    OWNER			       TABLE_NAME		       INI_TRANS  MAX_TRANS
    ------------------------------ ------------------------------ ---------- ----------
    TEST			       A2				     100	255
    
    当MAXTRANS的值不是255事,Oracle会无视这些值,一直使用255.

  • 相关阅读:
    xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!
    xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!
    xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!
    xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!
    Spring框架——AOP面向切面编程
    Spring学习
    面试题整理
    Java Web前端到后台常用框架介绍
    【Oracle】SQL/92 执行多个表的连接
    什么是持久化?
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13352214.html
Copyright © 2011-2022 走看看