NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
D-17
DCOMPRESS File Attribute
For more information, see the specific statement or directive.
DCOMPRESS File Attribute
DCOMPRESS is a Guardian file attribute that controls key compression in data blocks.
DCOMPRESS applies only to key-sequenced tables and to indexes.
The table default is NO DCOMPRESS.
The index default is the table value at index creation.
The default compression method is 1, the former compression method.
Considerations—DCOMPRESS
Purpose of key compression
Use DCOMPRESS when you need to save disk space but do not require maximum
performance. Because a given amount of disk space holds more keys if the keys are
compressed, key compression reduces the use of disk space; however, it also
increases overhead for accessing records.
Compression methods
DCOMPRESS 2 extends the compression technique to cover non-key columns,
which is not possible with DCOMPRESS 1. This strategy results in significant disk
space saving at a relatively lower performance price.
Restrictions on keys for compression
For compression method 1, the former method, a file cannot use key compression in
data blocks unless its primary key meets these requirements:
°
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 the following data types:
°
Fixed-length character: CHARACTER or PIC X
°
Unsigned integer: INTEGER or SMALLINT (not LARGEINT)
FREE RESOURCES
Statement
Closes cursors and releases locks held by a process
LOCK TABLE Statement Locks a table (or the underlying tables of a view) and associated
indexes
UNLOCK TABLE
Statement
Releases locks held on nonaudited tables or views
{ DCOMPRESS { 1 | 2 } | NO DCOMPRESS }
DCL Statements and Directives