5.8.5 Determining the number of storage pages for each text index segment
This subsection describes how to determine the number of storage pages for each text index segment.
The text index segments are as follows:
-
String control segment
-
Position control segment
- Organization of this subsection
(1) Determining the number of storage pages used in the string control segment (variable TIP_STRSEG(i))
The number of storage pages used in the string control segment (variable TIP_STRSEG(i)) can be determined by using the following formula:
Formula
Explanation of variables
- TIXSTR
-
Total number of pages for the text index's string control
Use the following formula to determine its value.
When a text index is added for a meaningful character string (such as a sentence), the final value will approach the value obtained from the formula for variable B. When a text index is added for a character string that consists of unrelated characters (such as a random character string), the final value might not approach the value obtained from the formula for variable B.
Formula
- row_num
-
Number of rows that are stored in the base table for which the text index has been defined
- string_num
-
Average number of characters stored in the columns in the text index
- page_size
-
Page size of data DB area (bytes)
- pctfree
-
Percentage of unused area specified in the CREATE INDEX statement (%)
If the percentage of unused area is not specified, assume 30% for the calculation.
- TIXCOR
-
Total number of pages required for correction search using a text index
You must determine this variable if you add the notation-correction-search text-index specification when defining a text index.
Use the following formula to determine its value.
When a text index is added for a meaningful character string (such as a sentence), the final value will approach the value obtained from the formula for variable B. When a text index is added for a character string that consists of unrelated characters (such as a random character string), the final value might not approach the value obtained from the formula for variable B.
Formula
- row_num
-
Number of rows that are stored in the base table for which the text index has been defined
- string_num
-
Average number of characters stored in the columns in the text index
- page_size
-
Page size of data DB area (bytes)
- pctfree
-
Percentage of unused area specified in the CREATE INDEX statement (%)
If the percentage of unused area is not specified, assume 30% for the calculation.
- TIXWORD
-
Total number of pages required for word-context search using a text index
You must determine this value if you add the text-index-word-context search specification when defining a text index.
Use the following formula to determine this value.
When a text index is added for a meaningful character string (such as a sentence), the final value will approach the value obtained from the formula for variable B. When a text index is added for a character string that consists of unrelated characters (such as a random character string), the final value might not approach the value obtained from the formula for variable B.
Formula
- row_num
-
Number of rows that are stored in the base table for which the text index has been defined
- string_num
-
Average number of characters stored in the columns in the text index
- subarea_num
-
Total number of data DB area files that make up the data DB area in which the base table for which the text index has been defined is stored
- page_size
-
Page size of data DB area (bytes)
- datapage_num
-
Number of data pages for the base table for which the text index has been defined (sum of the number of base row pages and the number of branch row pages)
- pctfree
-
Percentage of unused area specified in the CREATE INDEX statement (%)
If the percentage of unused area is not specified, assume 30% for the calculation.
(2) Determining the number of storage pages used in the position control segment (variable TIP_APPSEG(i))
The number of storage pages used in the position control segment (variable TIP_APPSEG(i)) can be determined by using the following formula:
Formula
TIP_APPSEG(i) = TIXAPP × 1.25
Explanation of variables
- TIXAPP
-
Total number of pages for the text index's position control
Use the following formula to determine this value.
When a text index is added for a meaningful character string (such as a sentence), the final value will approach the value obtained from the formula for variable B. When a text index is added for a character string that consists of unrelated characters (such as a random character string), the final value might not approach the value obtained from the formula for variable B.
Formula
- row_num
-
Number of rows that are stored in the base table for which the text index has been defined
- string_num
-
Average number of characters stored in the columns in the text index
- page_size
-
Page size of data DB area (bytes)
- subarea_num
-
Total number of data DB area files that make up the data DB area in which the base table for which the text index has been defined is stored
- datapage_num
-
Number of data pages for the base table for which the text index has been defined (sum of the number of base row pages and the number of branch row pages)
- pctfree
-
Percentage of unused area specified in the CREATE INDEX statement (%)
If the percentage of unused area is not specified, assume 30% for the calculation.