Product Documentation

FairCom DB API for C

Previous Topic

Next Topic

FairCom DB API API Compression

New index node types provide options for reducing index size. [01/2024]The new NAV (FairCom DB API) index modes are as follows:

  • Variable-Length Keys with Compression: CTINDEX_VARIABLE index mode provides variable length keys with padding compression to squeeze more capacity into each page block. Recommended for indexes over variable length data.
  • RLE Compression: CTINDEX_VARIABLE_RLE index mode uses variable length keys with a simple RLE key compression of bytes 0x0, 0x20, 0x30 resulting in shorter index entries and smaller index files. Recommended for indexes over variable length data with multiple segments, binary data, or large numeric data types (8 byte integers).

Example

The following example demonstrates how to use one of these modes:

pIndex = ctdbAddIndex(hTableCustMast, "cm_custnumb_idx", CTINDEX_VARIABLE_RLE, NO, NO);

For more information, see ctdbAddIndex in the FairCom DB API documentation.

TOCIndex