Data Blocks  «Prev  Next»
Lesson 3 Optimizing space usage within blocks
Objective Describe Oracle block space usage.

Optimizing Oracle Block Space Usage

How data is stored in an Oracle data block

High performance often depends on two factors: data block size and row storage. Let us now look at how data is stored within an Oracle data block.
Oracle places some overhead in every data block. When a data file is added to an Oracle tablespace, Oracle allocates the data file and formats each data block, adding header and footer information within each block. We can add objects to the remaining space.

How to allocate space in an Oracle data block

Oracle uses all of the row space in a data block, except for the space reserved by the PCTFREE storage management parameter.
To review, the PCTFREE table parameter sets the percentage of space to remain open for future updates of rows that already exist on that data block. PCTFREE can have a negative impact on performance if it is set too low. PCTFREE and PCTUSED work together to optimize the use of space in the data blocks of the extents within a data segment. We will look at setting PCTFREE and PCTUSED later in this module.

Only one object type may inhabit any given Oracle data block. Whenever Oracle allocates an extent for an object (table or index), it is the physical data blocks that are allocated to the object. Therefore a tablespace can have different data blocks with different PCTFREE space, but each data block will contain only one type of object.
Let us take a look at how data blocks are reserved with different amounts of free space.

Ad Cloud DBA Oracle

Data Block Size
This example shows that there are different amounts of reserved space within each of the data blocks.
The next lesson examines how Oracle manages data rows using the Oracle segment header.