eygle.com   eygle.com
eygle.com eygle
eygle.com  
 

« 送别柔柔 奥运福娃 蒙你没商量 | Blog首页 | Oracle9iR2 NF:压缩表技术 »

10g New Feature:MAXTRANS参数已经废弃
modb.pro

此前写过两篇文章,介绍ITL竞争的模拟,有朋友在留言版上留言无法模拟,经过询问,得知在Oracle10g上无法再现我的试验结果.

首先猜测是Oracle10g的处理方式不同,我决定动手来验证一下,首先在Oracle9i中,创建一个测试表,设置MAXTRANS参数,结果如下:

SQL> connect eygle/eygle
Connected.
SQL> CREATE TABLE EYGLE_ITL
2 (C1 NUMBER,
3 C2 VARCHAR2(10)
4 )
5 INITRANS 1 MAXTRANS 1
6 /

Table created.

SQL> select table_name,INI_TRANS,MAX_TRANS from user_tables where table_name='EYGLE_ITL';

TABLE_NAME INI_TRANS MAX_TRANS
------------------------------ ---------- ----------
EYGLE_ITL 1 1

而在Oracle10g中,我们注意到MAXTRANS参数的设置已经无效:

[oracle@danaly ~]$ sqlplus eygle/eygle

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jun 26 11:59:20 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options

SQL> CREATE TABLE EYGLE_ITL
2 (C1 NUMBER,
3 C2 VARCHAR2(10)
4 )
5 INITRANS 1 MAXTRANS 1
6 /

Table created.

SQL> select table_name,INI_TRANS,MAX_TRANS from user_tables where table_name='EYGLE_ITL';

TABLE_NAME INI_TRANS MAX_TRANS
------------------------------ ---------- ----------
EYGLE_ITL 1 255

我们注意到,不管如何设置,最终的MAX_TRANS都是255。

查阅Oracle手册得到如下说明:

Note:In earlier releases of Oracle Database, the MAXTRANS parameter limited the number of transaction entries that could concurrently use data in a data block. This parameter has been deprecated.

Oracle Database now automatically allows up to 255 concurrent update transactions for any data block, depending on the available space in the block.
The database ignores MAXTRANS when specified by users only for new objects created when the COMPATIBLE initialization parameter is set to 10.0 or greater.

也就是说在Oracle10g中,对于单个数据块,Oracle缺省最大支持255个并发,MAXTRANS参数被废弃。

这就是网友在10g上无法模拟我的结果的原因。

总结一下:当我们想要找到一个答案时,步骤可能很简单,只需要动手,思考。懒惰是要不得的,要知道天道酬勤

 


历史上的今天...
    >> 2013-06-26文章:
    >> 2011-06-26文章:
    >> 2009-06-26文章:
    >> 2008-06-26文章:
    >> 2007-06-26文章:
           摄影习作-小小的太阳
    >> 2005-06-26文章:
    >> 2004-06-26文章:

By eygle on 2006-06-26 15:25 | Comments (0) | Oracle12c/11g | 810 |


CopyRight © 2004~2020 云和恩墨,成就未来!, All rights reserved.
数据恢复·紧急救援·性能优化 云和恩墨 24x7 热线电话:400-600-8755 业务咨询:010-59007017-7040 or 7037 业务合作: marketing@enmotech.com