Nonstop Database, HiRDB Version 9 System Operation Guide
13.11.2 Preparations for using the hash facility for hash row partitioning
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
- RDAREAs in which a rebalancing table is stored can accommodate only the rebalancing table; other tables or indexes cannot be stored in these RDAREAs.
- An RDAREA for storing a rebalancing table requires the following number of segments: 1,024 partitioning RDAREAs count. This condition must be satisfied when the RDAREAs are created.
- In estimating the size of an RDAREA, you should add some margin to the number of segments computed from 1,024 partitioning RDAREAs count.
- 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
- An RDAREA for storing a rebalancing table can store only that rebalancing table; other tables or indexes cannot be stored. Therefore, when CREATE INDEX is specified for a rebalancing table, the names of the RDAREAs for storing the index cannot be omitted. If they are omitted, an RDAREA that stores the rebalancing table will be assumed, resulting in an error. An RDAREA that stores the rebalancing table must not be specified for an index.
- A cluster key index cannot be defined.
(4) Global buffer
All Rights Reserved. Copyright (C) 2011, 2015, Hitachi, Ltd.