分区默认segment大小变化(64k—>8M) , 11gR2中的CELL_PARTITION_LARGE_EXTENTS 参数

CELL_PARTITION_LARGE_EXTENTS now obsolete

During the Exadata course that I am just delivering in Munich, I noticed that the fairly new parameter CELL_PARTITION_LARGE_EXTENTS is already obsolete now:

SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
CORE    11.2.0.2.0      Production
TNS for Linux: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production
SQL> alter system set cell_partition_large_extents=true;
alter system set cell_partition_large_extents=true
*
ERROR at line 1:
ORA-25138: CELL_PARTITION_LARGE_EXTENTS initialization parameter has been made
obsolete

This parameter was introduced in 11.2.0.1 especially for Exadata Database Machine because the Allocation Unit Size (AU_SIZE) for Diskgroups built upon Exadata Cells is recommended with 4 MB. Large Segments should therefore use a multiple of 4 MB already for their initial extents. Although the parameter was made obsolete, the effect that was achievable with it is still present:

SQL> create table t (n number) partition by range (n) (partition p1 values less than (2));
Table created.
SQL> insert into t values (1);
1 row created.
SQL> select bytes/1024/1024 as mb from user_extents where segment_name='T';
 MB
----------
 8

I inserted before checking USER_EXTENTS because of the 11g New Feature deferred segment creation:

SQL> drop table t purge;
Table dropped.
SQL> create table t (n number);
Table created.
SQL> select bytes/1024/1024 as mb from user_extents where segment_name='T';
no rows selected
SQL> insert into t values (1);
1 row created.
SQL> select bytes/1024/1024 as mb from user_extents where segment_name='T';
 MB
----------
 .0625

Notice that only partitioned tables are affected by the 8 MB initial extent behavior. The new hidden parameter _PARTITION_LARGE_EXTENTS (defaults to true!) is now responsible for that:

SQL> alter session set "_partition_large_extents"=false;
Session altered.
SQL> drop table t purge;
Table dropped.
SQL> create table t (n number) partition by range (n) (partition p1 values less than (2));
Table created.
SQL> insert into t values (1);
1 row created.
SQL> select bytes/1024/1024 as mb from user_extents where segment_name='T';
 MB
----------
 .0625

Notice that the setting of CELL_PARTITION_LARGE_EXTENTS with alter session is silently overridden by the underscore parameter:

SQL> drop table t purge;
Table dropped.
SQL> alter session set cell_partition_large_extents=true;
Session altered.
SQL> create table t (n number) partition by range (n) (partition p1 values less than (2));
Table created.
SQL> insert into t values (1);
1 row created.
SQL> select bytes/1024/1024 as mb from user_extents where segment_name='T';
 MB
----------
 .0625

The parameter setting of the underscore parameter was still false.

SQL> drop table t purge;
Table dropped.
SQL> alter session set "_partition_large_extents"=true;
Session altered.
SQL> alter session set cell_partition_large_extents=false;
Session altered.
SQL> create table t (n number) partition by range (n) (partition p1 values less than (2));
Table created.
SQL> insert into t values (1);
1 row created.
SQL> select bytes/1024/1024 as mb from user_extents where segment_name='T';
 MB
----------
 8

Conclusion: With 11.2.0.2, partitioned tables get initial extents of 8 MB in size, which is particular useful in Exadata Environments where the ASM AU_SIZE will be 4 MB. But also ordinary Databases are affected – which is probably a good thing if we assume that partitioned tables will be large in size anyway and will therefore benefit from a large initial extent size as well.

Addendum: During my present Exadata course (03-JUN-2012), I saw a similar parameter for partitioned indexes also: _INDEX_PARTITION_LARGE_EXTENTS defaults to FALSE, though. Brief test:

SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
CORE    11.2.0.2.0      Production
TNS for Linux: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production

SQL> create table parti (n number) partition by range (n) (partition p1 values less than (2));
Table created.
SQL> insert into parti values (1);
1 row created.
SQL> commit;
Commit complete.
SQL> create index parti_idx on parti(n) local;
Index created.
SQL> select bytes from user_extents where segment_name='PARTI_IDX';
     BYTES
----------
     65536
SQL> drop index parti_idx;
Index dropped.
SQL> alter session set "_index_partition_large_extents"=true;
Session altered.
SQL> create index parti_idx on parti(n) local;
Index created.
SQL> select bytes from user_extents where segment_name='PARTI_IDX';
     BYTES
----------
   8388608

So this parameter gives us also 8M sized extents for partitioned indexes, but not by default.

原文连接:http://uhesse.com/2011/03/29/cell_partition_large_extent-now-obsolete/


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值