Documentation Home
HeatWave User Guide
Related Documentation Download this Manual
PDF (US Ltr) - 3.8Mb
PDF (A4) - 3.8Mb


5.8.1.1 Variable-length Encoding

Variable-length encoding is automatically applied when tables are loaded into MySQL HeatWave with the exception of string columns defined explicitly as dictionary-encoded columns. . You can define the encoding type while creating the table or later modify it using ALTER TABLE statement.

VARLEN columns can be declared as NULL.

Variable-length (VARLEN) encoding has the following characteristics:

  • Supports all character sets and collation types supported by the DB System, and expressions with non-boolean types. User defined character sets are not supported.

  • Minimizes the amount of data stored for string columns by efficiently storing variable length column values.

  • Permits more operations involving string columns to be offloaded than dictionary encoding.

  • Is more efficient than dictionary encoding with respect to storage and processing of string columns with a high number of distinct values relative to the cardinality of the table.

For information about MySQL HeatWave column limits and how they relate to VARLEN encoded columns, see Column Limits.

VARLEN Column Memory Requirements
  • For MySQL HeatWave nodes, a VARLEN encoded column value requires enough memory for the data plus two bytes for length information. Internal fragmentation or headers can affect the actual amount of memory required.

  • For DB System node, there is no memory requirement, apart from a small memory footprint for metadata.

VARLEN Supported Functions, and Operators

For supported functions and operators, refer to Section 5.3, “Supported Functions and Operators”.

VARLEN Supported Filters

VARLEN supports the following filters:

  • Column-to-column filters, excluding the <=> filter.

  • Column-to-constant filters, excluding the <=> filter.

VARLEN Supported Relational Operators
  • GROUP BY

  • JOIN

  • LIMIT

  • ORDER BY

VARLEN Encoding and Performance
  • The presence of VARLEN encoded VARCHAR or CHAR columns does not affect table load performance.

  • Table load and change propagation operations perform more slowly on VARLEN encoded TEXT type columns than on VARLEN encoded VARCHAR columns.

  • There are two main differences with respect to MySQL HeatWave result processing for variable-length encoding compared to dictionary encoding:

    • A dictionary decode operation is not required, which means that fewer CPU cycles are required.

    • Because VARLEN encoded columns use a larger number of bytes than dictionary-encoded columns, the network cost for sending results from MySQL HeatWave to the DB System is greater.

What's Next

Learn more about Dictionary Encoding.