This article explains how Databend combines KLL, Top-N, and Count-Min Sketch (CMS) to build optimizer statistics with lower `ANALYZE` overhead. Together, they balance histogram efficiency with accurate estimates for skewed and high-frequency values.