Nonstop Database, HiRDB Version 9 System Operation Guide

[Contents][Index][Back][Next]

13.11.2 Preparations for using the hash facility for hash row partitioning

Organization of this subsection
(1) Defining a rebalancing table
(2) RDAREAs for storing a rebalancing table
(3) Defining an index for a rebalancing table
(4) Global buffer

(1) Defining a rebalancing table

You must specify in CREATE TABLE one of HASHA to HASHF as the hash function. A table for which one of these hash functions is specified is called a rebalancing table. For details on the hash functions HASHA to HASHF, see the manual HiRDB Version 9 SQL Reference.

 
CREATE TABLE TABLE01
    (PCODE DEC(5) NOT NULL,PNAME NCHAR(15), ... ) HASH HASHF BY PCODE
     IN (RDAREA01,RDAREA02);
CREATE INDEX INDX01 ...
     IN ((RDAREA11),(RDAREA12));
 

(2) RDAREAs for storing a rebalancing table

  1. RDAREAs in which a rebalancing table is stored can accommodate only the rebalancing table; other tables or indexes cannot be stored in these RDAREAs.
  2. An RDAREA for storing a rebalancing table requires the following number of segments: [Figure]1,024 [Figure] partitioning RDAREAs count[Figure]. This condition must be satisfied when the RDAREAs are created.
  3. In estimating the size of an RDAREA, you should add some margin to the number of segments computed from [Figure]1,024 [Figure] partitioning RDAREAs count[Figure].
  4. Unused segments are needed in order to store data in a rebalancing table. For this reason, the RDAREA full error will result even if the RDAREA contains free pages. Therefore, you should manage the remaining space in the RDAREA by number of unused segments, rather than by number of free pages.

(3) Defining an index for a rebalancing table

(4) Global buffer

For each RDAREA that is storing the table, you must set the global buffer sectors count to at least [Figure]1,024 [Figure] partitioning-RDAREAs-count[Figure] [Figure] 2. Otherwise, the effects of buffering will not be realized.