Nonstop Database, HiRDB Version 9 Command Reference
This section presents examples (1 to 5) of using the rebalancing utility.
CREATE TABLE reb_table(hkeys INT NOT NULL,names CHAR(30))
FIX HASH HASHA BY hkeys IN (user01,user02)CREATE INDEX idx1 ON reb_table(hkeys) IN ((idx01),(idx02))
ALTER TABLE reb_table ADD RDAREA user03 FOR INDEX idx1 in idx03 |
pdrbal -k share -t reb_table control_file |
execstop time,9:00 1 report /dsk01/rest_file 2 |
CREATE TABLE sgml_table (
hkeys INT NOT NULL,
doctext SGMLTEXT ALLOCATE (sgmltext IN ((LOB1D),
(LOB2D)))
PLUGIN '<DTD>NEWSPAPER</DTD><EXTRACTparm>extract.prm
</EXTRACTparm>'
)
FIX HASH HASHA BY hkeys IN (user01,user02)CREATE INDEX idx1 ON sgml_table(hkeys) IN ((idx01),(idx02))
CREATE INDEX ngram_index USING TYPE MASTER.NGRAM on sgml_table(doctext)
in ((LOB1I),(LOB2I))ALTER TABLE sgml_table ADD RDAREA user03 FOR COLUMN doctext ALLOCATE(sgmltext IN LOB3D) FOR INDEX idx1 in idx03,ngram_index in LOB3I |
pdrbal -k share -t sgml_table control_file |
execstop time,12:00 1 unld_func type=sgmltext,func=unsgmltext(sgmltext) 2 reld_func type=sgmltext,func=sgmltext(blob) 3report /dsk01/rest_file 4 |
CREATE TABLE reb_table(hkeys INT NOT NULL,names CHAR(30))
FIX HASH HASHA BY hkeys IN (user01,user02)CREATE INDEX idx1 ON reb_table(hkeys) IN ((idx01),(idx02))
ALTER TABLE reb_table ADD RDAREA user03 FOR INDEX idx1 in idx03 |
pdrbal -k exclusive -t reb_table -l n control_file |
idxwork /idxwork1 1 sort /sortwork 2 report /dsk01/rest_file 3 |
CREATE TABLE reb_table(hkeys INT NOT NULL,names CHAR(30))
FIX HASH HASHA BY hkeys IN (user01,user02)CREATE INDEX idx1 ON reb_table(hkeys) IN ((idx01),(idx02))
ALTER TABLE reb_table ADD RDAREA user03 FOR INDEX idx1 in idx03 |
pdrbal -k exclusive -t reb_table -l n control_file |
idxwork bes2 /idxwork_bes2 1 sort bes2 /sortwork_bes2 2 report /dsk01/rest_file 3 |
This example adds the same RDAREAs as the existing one for a table (reb_table) in a HiRDB parallel server configuration and executes the rebalancing utility in the exclusive mode. The table is partitioned and stored in back-end server bes1 on host NODE24 and back-end server bes2 on host NODE25.
CREATE TABLE reb_table (hkeys INT NOT NULL,names CHAR(30))
FIX HASH HASHF BY hkeys IN (user01,user02)
CREATE INDEX idx1 ON reb_table(hkeys) IN ((idx01),(idx02)) |
ALTER TABLE reb_table ADD RDAREA user01 FOR INDEX idx1 in idx01 ALTER TABLE reb_table ADD RDAREA user02 FOR INDEX idx1 in idx02 |
pdrbal -k exclusive -t reb_table -i c control_file |
report /dsk01/rest_file 1 idxwork bes1 /idxwork_bes1 2 sort bes1 /sort_work_bes1 2 idxwork bes2 /idxwork_bes2 3 sort bes2 /sort_work_bes2 3 |
All Rights Reserved. Copyright (C) 2011, 2015, Hitachi, Ltd.