ORACLE-基础七(Storage Structure and Relationships)

来源:互联网 发布:中国企业数据网 编辑:程序博客网 时间:2024/05/07 08:32




Multiple Block Size Support

1.a database can ben created with a standard block size and up to four nonstandard block sizes.

2.Block sizes can have any power-of-two value between 2KB and 32KB


Standard Block Size

1.Set at database creation using the DB_BLOCK_SIZE prameter; cannot be changed without re-creating the database

2.Used for SYSTEM and TEMPORARY tablespaces

3.DB_CACHE_SIZE specifiles the size of the DEFAULT buffer cache for standard block size:

   a. Minimum size=one granule(4MB or 16MB)

   b.Default value=48MB


Nonstandard Block Size

1.Configure additional caches with the following dynamic parameters:

     a.DB_2K_CACHE_SIZE for 2KB blocks

     b.DB_4K_CACHE_SIZE for 4KB blocks

     c.DB_8K_CACHE_SIZE for 8KB blocks

     d.DB_16K_CACHE_SIZE  for 16KB blocks

     e. DB_32K_CACHE_SIZE for 32KB blocks

2.DB_nK_CACHE_SIZE is not allowed 

   if nK is the standard block size.

3.Mininum size for each cache is one granule.


Create Non-std Block Size TS

CREATE TABLESPACE tbs_1 DATAFILE 'tbs_1.dbf' SIZE 10M BLOCKSIZE 4K;


Multiple Block Size Rules

1.All partitions of a partitioned object must reside in tablespaces of the same block size.

2.All temporary tablespaces, including the permanent ones that are being used as default temporary tablespaces,must be of standard block size.

3.Index-organized table overflow and out-of-line LOB segments can be stored in a tablespace with a block size different from the base table.



数据从下往上放



Data Block Management

Two methods are available for managing data blocks:

   1.Automatic setment-space management

   2.Manual management


Auto segment-Space Mgmt

1.it is a method of managing free space in side database segments

2.Tracking in-segment free and used space is done using bitmaps as oppose to using free lists.

3.This method provides:

   a.Ease of managemen

   b.Better space utilization

   c.Better performance for concurrent INSERT operations

4. Bitmap segments contain a bitmap that describes the status fo each block in the segment with respect to its  

   available space.

5.The map is contained in a separate set of blocks referred to as bitmapped blocks(BMBS)

6.When inserting a new ro , the server serches the map for a block with sufficient space.

7. As the amount of space available in a block changes, its new state is reflected in the bitmap.


configuring ASSM

1.automatic setment-space management can be enabled at the tablespace level only, for locally managed tablespaces:

CREATE TABLESPACE data02 DATAFILE '/u01/oradata/data02.dbf' SIZE 5M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 64K SEGMENT SPACE MANAGEMENT AUTO

2.After a bablespace is created , the specifications apply to all segments created in the tablespace.


Manual Data Block Mgmt

1.Allows you to configure data blocks manually using parameters such as :

   a.PCTFREE

   b.PCTUSED

   c.FREELIST

2.The only method available in previous Oracle versions





当BLOCK 的剩余量<pctfree 就从freelist里取出, 当BLOCK的存储量<pctused ,则加入到freelist里边

truncate 会使高水位线复位, delete不会


Getting Storage Information

1.DBA_EXTENTS

2.DBA_SEGMENTS

3.DBA_TABLESPACES

4.DBA_DATA_FILES

5.DBA_FREE_SPACE




0 0
原创粉丝点击