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 |
pdrbal -k share -t sgml_table control_file |
execstop time,12:00 1 |
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 |
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 |
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))
CREATE INDEX idx1 ON reb_table(hkeys) IN ((idx01),(idx02)) |
ALTER TABLE reb_table ADD RDAREA user01 FOR INDEX idx1 in idx01 |
pdrbal -k exclusive -t reb_table -i c control_file |
report /dsk01/rest_file 1 |