Success Story

Fraîcheur de Paris Cut TimescaleDB Compression Time by 96% with Stormatics

Fixing TimescaleDB Compression at Scale: How Stormatics Helped Fraîcheur de Paris Reduce Chunk Processing Time from 72 to 3 Minutes

Fraîcheur de Paris is a public utility company that operates the district cooling system in Paris, delivering sustainable cooling solutions to a wide range of buildings, including offices, museums, hospitals, and schools. The organization manages hundreds of gigabytes of data collected across the city.

The Challenge 

Fraîcheur de Paris reached out to Stormatics for assistance with an issue in their production environment involving TimescaleDB. After performing a major backfill of data on a hypertable, the automated compression policy in TimescaleDB stopped functioning as expected and was no longer compressing new chunks automatically.

Even with the compression policy enabled, compressing just a single chunk took over 72 minutes, an unusually slow performance. As a result, they were forced to compress chunks manually, which is not the recommended approach and can be both time-consuming and operationally inefficient.

The Solution

Stormatics stepped in to help resolve the issue and began working closely with the Fraîcheur de Paris team. After several brainstorming sessions, the Stormatics team proposed a solution: drop the existing compression policy, decompress all the chunks in the hypertable, and then recompress them entirely.

This approach was tested in the staging environment to ensure it worked as expected. Stormatics also coordinated with Timescale engineering team to ensure that the approach aligned with best practices. Once validated, the same process was carried out in production. After successfully recompressing the entire hypertable manually, the compression policy was re-enabled to restore automated chunk compression.

The Result

As a result, once the compression policy was re-enabled on production, it started working as expected and began automatically compressing new chunks again. The policy is now successfully compressing chunk tables, taking just around 3 minutes per chunk, an impressive improvement compared to the earlier rate of over 6 hours for just 5 chunks.

Sharing Best Practices to Prevent Future Issues

As a next step, the Stormatics team documented best practices for performing large-scale backfills and mass deletions in TimescaleDB. These guidelines were shared with the Fraîcheur de Paris team to help prevent similar issues from occurring in the future.

Why Stormatics?

Stormatics is a consulting firm that specializes in keeping critical Postgres databases fast, reliable, and resilient.

We partner with CTOs who need robust, scalable, and cost-efficient database solutions to power their applications and drive growth, implementing proven methodologies built for real-world performance.

At Stormatics, we help reduce costs, boost performance, and ensure continuity through a precision-driven approach that evolves your database infrastructure without disruption.

Our Signature Engagement Process

  1. ➡️ Phase 1: We assess your system to pinpoint exactly what is causing the issue via interactive sessions.
  2. ➡️ Phase 2: We provide a clear and tailored solution with pros, cons, and a recommended path forward.
  3. ➡️ Phase 3: We implement the selected solution and equip your team to maintain it effectively.

We are your trusted PostgreSQL experts

Book a call with us today!

 

Download the Case Study