How Polymarket Scaled Their Data Stack with Postgres + ClickHouse
Polymarket faced challenges with their PostgreSQL database as their trading volume surged, leading to slow analytical queries and resource-heavy features. To address these issues, they implemented ClickHouse as a dedicated analytics engine while retaining PostgreSQL for transactional workloads. This hybrid architecture significantly improved performance and allowed for real-time analytics at scale.
- ▪Polymarket's PostgreSQL struggled under the weight of increasing analytical workloads due to high trading volumes.
- ▪They introduced ClickHouse to handle heavy analytics, allowing PostgreSQL to focus on transactional operations.
- ▪The implementation of materialized views in ClickHouse dramatically improved leaderboard query times from frequent timeouts to under 50 milliseconds.
Opening excerpt (first ~120 words) tap to expand
try { if(localStorage) { let currentUser = localStorage.getItem('current_user'); if (currentUser) { currentUser = JSON.parse(currentUser); if (currentUser.id === 3784301) { document.getElementById('article-show-container').classList.add('current-user-is-article-author'); } } } } catch (e) { console.error(e); } NevoSayNevo Posted on May 27 How Polymarket Scaled Their Data Stack with Postgres + ClickHouse #analytics #database #dataengineering #postgres Prediction markets move fast — and so does their data. As Polymarket grew to billions in monthly trading volume, their PostgreSQL database started struggling under the weight of analytical workloads. Here's how they solved it by introducing ClickHouse as a dedicated analytics engine.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at DEV.to (Top).