Track · 2:31 · Liner note

A Dictionary, Well Thumbed

A ClickHouse dictionary is an in-memory key-value structure, loaded from a source such as a table or file, that lets queries look up reference data with dictGet instead of running a join.

Reference data gets looked up constantly: country codes, product names, status labels. A ClickHouse dictionary keeps that data in memory as a key-value structure and lets a query fetch it with dictGet instead of joining a table for every lookup. A Dictionary, Well Thumbed is the one opened so often that the spine has gone soft.

Two things to settle: where it reloads from and how often, since the lifetime setting decides how stale a label may be, and whether it fits in memory, which most layouts assume. Get both right and the lookup costs almost nothing.