ITPub博客

首页 > Linux操作系统 > Linux操作系统 > extent autoallocate的策略

extent autoallocate的策略

原创 Linux操作系统 作者:ylw66 时间:2009-09-11 17:08:39 0 删除 编辑

SQL> create tablespace yang2

  2  datafile 'd:\oracle\oradata\game\yang2.ora' size 5m reuse

  3  autoextend

  4  on next 10m maxsize unlimited

  5  extent management local autoallocate

  6  segment space management manual;

表空间已创建。

 

SQL> create table test2(x int,y varchar2(1200),z varchar2(1200))

  2  pctfree 70 pctused 20

  3  tablespace yang2;

表已创建。

 

SQL> insert into test2 select rownum,lpad('a',1200),lpad('a',1200)

  2  from dba_objects

  3  where rownum<500;

已创建499行。

 

SQL> commit;

提交完成。

 

查下extent的分配情况

SQL> select extent_id,blocks from dba_extents t where t.segment_name='TEST2' and

 t.owner='SCOTT';

 EXTENT_ID     BLOCKS

---------- ----------

         0          8

         1          8

         2          8

         3          8

         4          8

         5          8

         6          8

         7          8

         8          8

         9          8

        10          8

        11          8

        12          8

        13          8

        14          8

        15          8

        16        128

        17        128

        18        128

 

已选择19行。

前16个extent,每个extent分配了8个block,从第17个extent开始,每个extent分配128个block

 

SQL> insert into test2 select rownum,lpad('a',1200),lpad('a',1200)

  2  from dba_objects;

已创建29669行。

 

SQL> commit;

提交完成。

 

SQL> select extent_id,blocks from dba_extents t

  2  where t.segment_name='TEST2'

  3  and t.owner ='SCOTT'

  4  and blocks >8;

 

 EXTENT_ID     BLOCKS

---------- ----------

        16        128

        17        128

        18        128

        19        128

        20        128

        21        128

        22        128

        23        128

        24        128

        25        128

        26        128

        27        128

        28        128

        29        128

        30        128

        31        128

        32        128

        33        128

        34        128

        35        128

        36        128

        37        128

        38        128

        39        128

        40        128

        41        128

        42        128

        43        128

        44        128

        45        128

        46        128

        47        128

        48        128

        49        128

        50        128

        51        128

        52        128

        53        128

        54        128

        55        128

        56        128

        57        128

        58        128

        59        128

        60        128

        61        128

        62        128

        63        128

        64        128

        65        128

        66        128

        67        128

        68        128

        69        128

        70        128

        71        128

        72        128

        73        128

        74        128

        75        128

        76        128

        77        128

        78        128

        79       1024

        80       1024

        81       1024

        82       1024

        83       1024

        84       1024

        85       1024

        86       1024

        87       1024

        88       1024

        89       1024

        90       1024

        91       1024

        92       1024

到第80个extent时,自动分配1024个块每个extent,即64个extent分配了128个块

不继续测试了

 

extent management local autoallocate,对每个extent自动分配大小

first 16 extent include 8 blocks

next 64 extent include 128 blocks

next extent include 1024 blocks

 

写这个是为了写autoallocate时bitmap是啥样的

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

上一篇: extent bitmap(1)
下一篇: NLS_LANG
请登录后发表评论 登录
全部评论

注册时间:2009-07-29

  • 博文量
    57
  • 访问量
    107663