Scalable Database Server, HiRDB Version 8 Installation and Design Guide
![[Contents]](FIGURE/CONTENT.GIF)
![[Index]](FIGURE/INDEX.GIF)
![[Back]](FIGURE/FRONT.GIF)
(1) Effects of setting a percentage of unused space in a page
- If the length of contiguous free space is longer than the row length after update processing, the corresponding row can fit in the page even if it has become longer than its original length as a result of UPDATE statement processing.
- When the INSERT statement is used to add rows repeatedly, the pages close to the cluster key value can become filled with rows.
(2) Criteria
- You should specify a percentage of unused space in a page if rows will be added to a table for which a cluster key is specified.
- For a table with the FIX attribute, if data will be sorted in ascending order, you can improve the storage efficiency by setting the percentage of unused space in a page to 0.
- You should specify a percentage of unused space in a page if rows will become longer as a result of update processing.
- Rows become longer when the following types of update processing are executed:
- The null value is updated to real data.
- A column with the VARCHAR, NVARCHAR, MVARCHAR or BINARY data type is updated so that the value becomes longer.
(3) Specification
If the set amount of unused space is too small and a row becomes longer as a result of update processing, the number of input/output operations increases because a single row spans multiple pages.
- Generally, the value obtained from the following formula is used as the percentage of unused space (where the length of the first row stored is L1 and becomes L2 after processing):
- Percentage of unused space in a page = ((L2-L1)
L2)
100 (%)
- The following procedure should be used when a cluster key is specified for a table:
- Obtain the number of data items per page that are stored in the table by the database load utility (pdload); assume that this value is m.
- Obtain the number of data items that will be stored later; assume that this value is n.
- Use the following formula to obtain the percentage of unused space in a page from m and n obtained in steps 1 and 2:
Percentage of unused space in a page = (n
(m + n))
100 (%)
All Rights Reserved. Copyright (C) 2007, Hitachi, Ltd.