1. 首页
  2. IT资讯

11gR2关于延时段建立,和初始化分区段8M的说明

11.2.0.1
Deferred segment creation
When creating a nonpartitioned heap-organized table in a locally managed
tablespace, table segment creation is deferred until the first row is inserted
11.2.0.3
New default first extent size for partitioned tables improves performance
The default size of the first extent of any new segment for a partitioned table is
now 8 MB instead of 64 KB. This helps improve performance of inserts and queries
on partitioned tables. Although partitioned tables will start with a larger initial
size, once sufficient data is inserted, the space consumption will be the same as in
previous releases. You can override this default by setting the INITIALsize in the
storage clause for the table. This new default only applies to table partitions and
LOB partitions.

以上给出2个11GR2的新特性。第一个是延时段建立,第二个是分区表的SEGMENT从以前初始化8*8=64K
增加大8MB。所以这样的情况下,在建立分区表的时候实际上是没有SEGMENTS的,但是一旦插入了第一条
数据后初始的SEGMENT的第一个EXTENT为8MB,这是和以前的2个不同。
测试如下:
10g
SQL> CREATE TABLE t_pe_r1 (i NUMBER, j NUMBER , f varchar2(20),k varchar2(20))
  2       PARTITION BY RANGE(j)
  3          (PARTITION p1 VALUES LESS THAN (10),
  4           PARTITION p2 VALUES LESS THAN (20),
  5           PARTITION P3 VALUES LESS THAN (30),
  6           PARTITION P4 VALUES LESS THAN (40),
  7           PARTITION p5 VALUES LESS THAN (maxvalue));
 
Table created
SQL> select SEGMENT_NAMe,PARTITION_NAME,BYTES from dba_segments where segment_name=’T_PE_R1′;
 
SEGMENT_NAME                                                                     PARTITION_NAME                      BYTES
——————————————————————————– —————————— ———-
T_PE_R1                                                                          P1                                  65536
T_PE_R1                                                                          P2                                  65536
T_PE_R1                                                                          P3                                  65536
T_PE_R1                                                                          P4                                  65536
T_PE_R1                                                                          P5                                  65536

11g

SQL> CREATE TABLE t_pe_r1 (i NUMBER, j NUMBER , f varchar2(20),k varchar2(20))
  2       PARTITION BY RANGE(j)
  3          (PARTITION p1 VALUES LESS THAN (10),
  4           PARTITION p2 VALUES LESS THAN (20),
  5           PARTITION P3 VALUES LESS THAN (30),
  6           PARTITION P4 VALUES LESS THAN (40),
  7           PARTITION p5 VALUES LESS THAN (maxvalue));
 
Table created
 
SQL>
SQL> select SEGMENT_NAMe,PARTITION_NAME,BYTES from dba_segments where segment_name=’T_PE_R1′;
 
SEGMENT_NAME                                                                     PARTITION_NAME                      BYTES
——————————————————————————– —————————— ———-
 
 
SQL> insert into t_pe_r1 values(10,10,’test’,’test’);
 
1 row inserted
 
SQL> commit;
 
Commit complete
 
SQL> select SEGMENT_NAMe,PARTITION_NAME,BYTES from dba_segments where segment_name=’T_PE_R1′;
 
SEGMENT_NAME                                                                     PARTITION_NAME                      BYTES
——————————————————————————– —————————— ———-
T_PE_R1                                                                          P2                                8388608

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7728585/viewspace-1261449/,如需转载,请注明出处,否则将追究法律责任。

主题测试文章,只做测试使用。发布者:深沉的少年,转转请注明出处:http://www.cxybcw.com/183346.html

联系我们

13687733322

在线咨询:点击这里给我发消息

邮件:1877088071@qq.com

工作时间:周一至周五,9:30-18:30,节假日休息

QR code