SQL/MP Reference Manual

HP NonStop SQL/MP Reference Manual523352-013
D-19
Considerations—DCOMPRESS
The key must begin with the first column in the table.
The key columns must be contiguous.
The key columns must be in ascending order.
The key columns have only these data types:
Fixed-length character: CHARACTER or PIC X
Unsigned integer: INTEGER or SMALLINT (not LARGEINT)
Unsigned exact numeric: NUMERIC (1 to 9) or PIC 9V9 COMP (not
NUMERIC (10) or larger or PIC S9)
Unsigned decimal: includes PIC 9V9 DISPLAY
For compression method 2, the new method, these data types are supported:
Fixed-length character: CHARACTER or PIC X
Unsigned integer: INTEGER or SMALLINT (not LARGEINT)
Unsigned exact numeric: NUMERIC (1 to 9) or PIC 9V9 COMP (not NUMERIC
(10) or larger or PIC S9)
Unsigned decimal: DECIMAL UNSIGNED, includes PIC 9V9 DISPLAY
Date and time data types: DATE, DATETIME, TIMESTAMP, and TIME
Multibyte character types: NATIONAL CHARACTER, NCHAR
When a key-sequenced SQL/MP table is created with DCOMPRESS 2, an
alternate method of compression is used for each data row (but the key must be a
simple key). Similar to DCOMPRESS 1, the key is compressed with the leading
compression. The rest of the data in each row is compressed using the SOBMAP
compression, which compresses repeated data, blanks, and binary zeros.
DCOMPRESS 2 does not support these data types:
CHAR VARYING
VARCHAR
NUMERIC SIGNED
SMALLINT | INTEGER signed
LARGEINT signed
FLOAT | REAL | DOUBLE PRECISION
DECIMAL signed
INTERVAL
Note. DCOMPRESS 2 is not advised when updates are routine because the cost of
compression and decompression can be relatively high.