EPISODE · Jul 19, 2026 · 12 MIN
Why Database Compression Needs Dictionary Encoding Not Just Run-Length
from Database Tech with Fexingo: SQL, NoSQL, and Data Storage Conversations · host Fexingo
Lucas and Luna dig into the neglected art of database compression. While most engineers know run-length encoding for repetitive columns, dictionary encoding often delivers 5x better compression on low-cardinality string data without the decompression tax at query time. They walk through a real example: a 500-million-row ecommerce table storing payment method strings like 'Visa', 'Mastercard', 'Amex'. With 3 distinct values, dictionary encoding maps each string to a 2-bit integer, shrinking 500 million copies from 8 bytes each down to 2 bits plus a tiny lookup table. Run-length encoding would require sorting the table first, which breaks the insert order. They also discuss hybrid approaches like prefix compression for sorted strings and bitmap encoding for boolean flags, closing with the trade-off between compression ratio and CPU cost in OLTP vs OLAP workloads. A concrete, practical takeaway for anyone managing storage costs or query performance at scale. #DatabaseCompression #DictionaryEncoding #RunLengthEncoding #DataStorage #QueryPerformance #ColumnarStorage #OLTP #OLAP #StorageEfficiency #PostgreSQL #MySQL #DataEngineering #Technology #DatabaseTechWithFexingo #FexingoBusiness #BusinessPodcast #DataTips #TechTalk Keep every episode free: buymeacoffee.com/fexingo
Embed this episode
Ready to play
Why Database Compression Needs Dictionary Encoding Not Just Run-Length
No transcript for this episode yet
Similar Episodes
No similar episodes found.
Similar Podcasts
No similar podcasts found.