v.21.4New Features
Added Async Update and Nullable Support in Cache Dictionaries
Added async update inComplexKeyCache,SSDCache,SSDComplexKeyCachedictionaries. Added support forNullabletype inCache,ComplexKeyCache,SSDCache,SSDComplexKeyCachedictionaries. Added support for multiple attributes fetch withdictGet,dictGetOrDefaultfunctions. Fixes #21517. #20595 (Maksim Kita).
Why it matters
The feature addresses performance and flexibility limitations of dictionary caches by enabling asynchronous updates, which improve cache refresh efficiency. SupportingNullable 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 forComplexKeyCache, 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.