Wednesday 11 June 2014

tablespace segment space management

Tablespace segment space management :
Tablespace segment space management has two options auto and manual and by default segment space management is manual.
Find below description for auto and manual SSM:
Manual:
Manual segment space management uses freelist for future utilization of tables.Data blocks are being added up to freelist then data insertion into table being possible.
To add blocks to freelist oracle database system compares PCT_USED and PCT_FREE
PCTUSED
PCTUSED is a block storage parameter used to specify when Oracle should consider a database block to be empty enough to be added to the freelist. Oracle will only insert new rows in blocks that is enqueued on the freelist. For example, if PCTUSED=40, Oracle will not add new rows to the block unless sufficient rows are deleted from the block so that it falls below 40% used.
That means when database block usespace <PCT_USED then the block being available to freelist and allow to insert row into tables.By default value for pct_used is 40

PCTFREE

PCTFREE is a block storage parameter used to specify how much space should be left in a database block for future updates. For example, for PCTFREE=10, Oracle will keep on adding new rows to a block until it is 90% full. This leaves 10% for future updates (row expansion).
When using Oracle Advanced Compression, Oracle will trigger block compression when the PCTFREE is reached. This eliminates holes created by row deletions and maximizes contiguous free space in blocks.
That means when database block freespace < PCT_FREE then the block being unavailable  to free list and does not allow to insert row. Because,pst_free specified space available only for future row expansion on update. By default value for pct_free is 10.

PCTINCREASE

PCTINCREASE refers to the percentage by which each next extent (beginning with the third extend) will grow. The size of each subsequent extent is equal to the size of the previous extent plus this percentage increase.
Auto:
Its unlike manual SSM it uses bitmap instead of freelist and not using pct_used and pct_free parameter.

It is not available for temporary and system tablespace and only available for tablespace configured for local extend management .Automatic segment management performs better and reduces maintenance task.
Below shown picture Describes SSM and parameters :


No comments:

Post a Comment