Cloudflare migrated from vanilla PostgreSQL to TimescaleDB for their Digital Experience Monitoring and Zero Trust Analytics products, achieving 5-35x query performance improvements and 33x storage compression. The team initially chose PostgreSQL over ClickHouse to maintain architectural simplicity, but as data scaled to billions of rows, they needed better performance. TimescaleDB provided automatic partitioning, continuous aggregates, columnstore compression, and sparse indexes while maintaining PostgreSQL compatibility. Key optimizations included proper index column ordering, compression policies, and segmentation strategies that dramatically improved query latency and reduced storage costs.
Table of contents
Designing for future growthMaking Digital Experience Monitoring simpleUsing PostgreSQL for analyticsAbout order of columns in multicolumn indexesLaunch and improvementsOptimizing query performance with precomputed aggregatesTable partitioningTimescaleDBEvaluating TimescaleDB for DEXWhat makes columnstore so fast?TimescaleDB at CloudflareConclusionSort: