One of the new features in Oracle AI Database 26ai is the introduction of Memory Speed Hybrid Columnar Compression or Memspeed HCC. You can think of this as Hybrid Columnar Compression (HCC) version 2.0. One of the main advantages of Memspeed HCC is that it uses the same columnar formats that are used in the In-Memory column store and CELLMEMORY in the Exadata Smart Flash Cache. Memspeed HCC uses a larger Compression Unit (CU) size and new format as compared to the original HCC. This new format better leverages In-Memory formats to enhance SIMD processing and dictionary encoding to significantly improve compression, filter predicate pruning and join processing. This results in faster query performance when data is on-disk and allows much faster CELLMEMORY population into the Exadata Smart Flash Cache.

Compared to the original HCC, the new Memspeed HCC is an all-around better choice for very large data volumes that still have active query and data loading workloads. Memspeed HCC is available on Exadata platforms starting with Oracle AI Database 26ai 23.26.0, and requires the Exadata System Software 25.x October update to support Smart Scan on Memspeed HCC segments.

As mentioned previously, Memspeed HCC uses a new columnar storage format, so it is not compatible with the original HCC. This means that to enable Memspeed HCC requires data movement. You will have to move existing data into segments defined with the new format. Obviously new data can be directly inserted into segments that are defined for Memspeed HCC.

For existing data, you can use DBMS_COMPRESSION to estimate the new compression ratio for data to be converted. The ALTER TABLE command can be used on segments to specify Memspeed HCC for new rows, and ALTER TABLE MOVE or DBMS_REDEFINITION are supported to recompress existing data into the Memspeed HCC format.

Since this is a new format there is new syntax associated with the feature. The syntax is an addition to the original HCC syntax. For example:

COLUMN STORE COMPRESS FOR MEMSPEED {QUERY|QUERY LOW|QUERY HIGH|ARCHIVE}

QUERY is equivalent to QUERY HIGH and is the default because it is the best level for query performance. QUERY LOW offers the best balance for mixed workloads with considerable transactional processing and uses lower compression to achieve better performance for DML and fetch-by-rowid operations.

To summarize, the benefits of using Memspeed HCC instead of the original HCC are threefold. First, for queries you can expect up to 2x faster performance as compared to the original HCC format and up to 6x faster performance for CPU-bound table scans. This is due to the significantly better columnar processing techniques for Memspeed HCC formats. The second big benefit comes with data loads. Data loads into the Memspeed HCC formats can be up to 2x faster for the ARCHIVE compression level. The loading benefits come from more efficient space management for highly compressed columnar loads. And the third benefit comes from faster CELLMEMORY population, which allows queries to start benefitting from the new flash cache format sooner. Initial data loads, data movement and cache invalidations are some of the scenarios where faster population is beneficial.