12.1.4 Global buffer allocation procedures

Organization of this subsection
(1) Index global buffer
(2) Data global buffer
(3) LOB global buffer
(4) Example of global buffer definition

(1) Index global buffer

The index identifier of the index for which a global buffer is to be allocated is specified in the -i option of the pdbuffer operand in the system common definition. In the case of a cluster key index, the index identifier assigned by HiRDB is specified. Once a table with a cluster key has been defined, the index identifier for the cluster key can be obtained by retrieving from the dictionary tables the INDEX_NAME column of the SQL_INDEXES table. In this case, the index identifier for the cluster key is displayed as follows:

(CLUSTER table-number)

For details about dictionary table retrieval and the SQL_INDEXES table, see the manual HiRDB Version 8 UAP Development Guide.

The number of global buffer sectors should at least equal the number of index pages (value obtained as the index storage page count). It may be necessary to increase or decrease this number depending on the importance of the index. The number of index pages in use can be checked with the database condition analysis utility (pddbst).

(2) Data global buffer

The name of the RDAREA for which a global buffer is to be allocated is specified in the -r option of the pdbuffer operand in the system common definition.

(3) LOB global buffer

To allocate a LOB global buffer, use the following procedure:

  1. Specify in the -r option of the pdbuffer operand in the system common definition the name of the LOB RDAREA for which a global buffer is to be allocated.
  2. Specify in the -b option of the pdbuffer operand in the system common definition the name of the LOB RDAREA for which a global buffer is to be allocated.

(4) Example of global buffer definition

Organization of RDAREAs

The following shows the organization of the RDAREAs:

Type of RDAREARDAREA name
Master directory RDAREARDMAST
Data directory RDAREARDDIR
Data dictionary RDAREARDDIC
User RDAREAsUSER01, USER02, USER03
User LOB RDAREAULOB03
Data dictionary LOB RDAREAsDICLOB01, DICLOB02
List RDAREALIST01
Definition example

The following shows an example of global buffer definition:

pdbuffer -a DGB1 -n 1000 -r RDMAST,RDDIR,RDDIC              1
pdbuffer -a DGB2 -n 1000 -r USER01,USER02
pdbuffer -a DGB3 -n 1000 -r USER03
pdbuffer -a DGB4 -n 1000 -r ULOB03
pdbuffer -a DGB5 -n 1000 -r DICLOB01
pdbuffer -a DGB6 -n 1000 -r DICLOB02
pdbuffer -a DGB7 -n 1000 -r LIST01

pdbuffer -a LGB1 -n 1000 -b ULOB03                          2
pdbuffer -a LGB2 -n 1000 -b DICLOB01
pdbuffer -a LGB3 -n 1000 -b DICLOB02

pdbuffer -a IGB1 -n 1000 -i USER1.INDX01                    3
pdbuffer -a IGB2 -n 1000 -i USER1.INDX02

Explanation:
  1. This is a definition of data global buffer. It uses the -r option to specify all RDAREAs to be created.
  2. This is a definition of LOB global buffer. The RDAREAs specified with the -b option must also be specified with the -r option.
  3. This is a definition of index global buffer. It uses the -i option to specify the index authorization identifier and index identifier.
The following provides a brief explanation of the pdbuffer operand's options that are used in this example:
-a: Specifies the name of the global buffer.
-n: Specifies the number of global buffer sectors.
-r: Specifies the RDAREAs to be allocated to the data global buffer.
-b: Specifies the LOB RDAREAs to be allocated to the LOB global buffer.
-i: Specifies the indexes to which the index global buffer is to be allocated.