Tip

Use of standardized file sizes

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

    Requires Free Membership to View

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

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

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:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.