v.21.4New Features

Added Async Update and Nullable Support in Cache Dictionaries

Added async update in ComplexKeyCache, SSDCache, SSDComplexKeyCache dictionaries. Added support for Nullable type in Cache, ComplexKeyCache, SSDCache, SSDComplexKeyCache dictionaries. Added support for multiple attributes fetch with dictGet, dictGetOrDefault functions. Fixes #21517. #20595 (Maksim Kita).
Added asynchronous update capabilities and Nullable type support to dictionary caches (ComplexKeyCache, SSDCache, SSDComplexKeyCache). Enhanced dictionary functions dictGet and dictGetOrDefault to fetch multiple attributes in a single query.

Why it matters

The feature addresses performance and flexibility limitations of dictionary caches by enabling asynchronous updates, which improve cache refresh efficiency. Supporting Nullable types in caches increases the versatility of dictionaries in handling nullable data. Fetching multiple attributes at once reduces the number of dictionary lookups needed, thereby optimizing query performance.

How to use it

To utilize asynchronous updates, enable async update in the dictionary cache configuration for ComplexKeyCache, SSDCache, or SSDComplexKeyCache. Define dictionary attributes with the Nullable type as needed. Use the enhanced syntax of dictGet and dictGetOrDefault functions to request multiple attributes simultaneously, for example:

SELECT 
dictGet('dict_name', 'attr1', <key>),
dictGet('dict_name', 'attr2', <key>)
FROM ...


or use the multi-attribute fetching support provided in the new versions.