Repeated values become compact codes
A business table may contain the same country, product category, or status in thousands of rows. Storing each word over and over wastes memory. SAP HANA can instead build a dictionary: a list of the distinct values, each assigned a small numeric code. The rows then store those codes rather than repeating the original text.
For example, a column containing “Open,” “Closed,” and “Pending” can keep those three words in its dictionary while representing each row with a code. When a query needs to show the words, HANA uses the dictionary to translate the codes back.
Less data to move, more room to work
HANA is designed to keep much of its working data in RAM, where it can be accessed more quickly than data that must be fetched from storage. RAM is limited and costly, so shrinking repeated data lets a system keep more of a large dataset in memory.
The benefit is not only capacity. Compact codes mean less data has to be read and moved while a query runs. For some operations, the database can compare or group the codes directly, consulting the dictionary only when it needs the corresponding values. That can reduce work as well as memory use.
Dictionary compression works best when a column has many repetitions relative to its number of distinct values. A column where nearly every entry is unique offers less opportunity for this particular technique. The practical payoff is that common, repetitive business data can occupy a smaller in-memory footprint—leaving more room for the data and queries that need to be fast.





