Use of standardized file sizes

To use space optimally, it is better to use standardized file sizes that are multiples of DB_BLOCK_SIZE.

This Content Component encountered an error

To use space optimally, it is better to use standardized file sizes that are multiples of DB_BLOCK_SIZE and also multiples of OS_STRIPE_SIZE. For example, suppose you want to create a data file of 1000MB. Here is the calculation:

If BLOCK SIZE = 8K, the total number of blocks available=(1000/8)*1024, which is 128000 blocks in this case. The first block of every data file does not contain user data--it contains the file header used for storing internal information such as current SCN, checkpoint structure, etc. Subtract this block from the calculation. Thus, the net total number of blocks available for insertion is 12800-1 = 127999 blocks.

As Oracle recommends, INITIAL / NEXT extents should be multiples of DB_BLOCK_SIZE. So, let us consider PCT_INCREASE = 0. Then the number of blocks corresponding to initial /next extent size is as follows:

Initial/Next Extent Size        1Mb   10Mb   16Mb
Number of Blocks                128   1280   2048

We know the total number of blocks available for insertion is 127999 which is not a factor of the number of blocks we calculated above in the table. So parts of the bytes are wasted.

Now let us say you created a data file of 1000Mb + 8KB = 1024008 Kb instead of 1000Mb. The calculation goes as follows:

Total number of blocks available = (1024008/8) = 128001 blocks. Net total number of blocks available for insertion = 128001 - 1 = 12800 blocks. 12800 is a factor of the number of blocks calculated above, so there is no wasted space at all.

For More Information


This was first published in May 2001

Dig deeper on Oracle database design and architecture

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close