This section presents examples of using the database reorganization utility (re-creating indexes), listed as follows:
Example | Description | Classification |
---|---|---|
1 | Re-creating a plug-in index
| S |
2 | Re-creating indexes in units of index storage RDAREAs | P |
3 | Re-creating indexes in units of indexes |
S: HiRDB/Single Server
P: HiRDB/Parallel Server
CREATE TABLE TABLE1(C1 INT,C2 SGMLTEXT
ALLOCATE (SGMLTEXT IN LOBUSER01)
PLUGIN'<DTD>sgml.dtd</DTD>' ) IN PDBUSER01
CREATE INDEX INDEX1 USING TYPE NGRAM ON TABLE1(C2)
IN LOBUSER02
index INDEX1 LOBUSER02 /usr/index_file 1 |
CREATE TABLE TABLE1(C1 INT NOT NULL,C2 CHAR(8),C3 INT)
IN ((PDBUSER01) C1 > 10,(PDBUSER02))
CREATE INDEX INDEX1 ON TABLE1(C1)
IN ((PDBUSER03),(PDBUSER05))
CREATE INDEX INDEX2 ON TABLE1(C2,C1)
IN ((PDBUSER04),(PDBUSER06))
index INDEX1 PDBUSER03 /usr/index_inf1 1 |
CREATE TABLE TABLE1(C1 INT,C2 INT NOT NULL)
IN ((PDBUSER01) C2<200,(PDBUSER02) C2<400,(PDBUSER03))
CREATE INDEX INDEX1 ON TABLE1(C2) IN ((IDX01),(IDX02),(IDX03))
CREATE INDEX INDEX2 ON TABLE1(C1) IN ((IDX04),(IDX05))
idxname name=* 1 |
idxname name=INDEX1 1 |