DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 964,423 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
Cover image for Compacting historical data in Clickhouse
Onelinerhub
Onelinerhub

Posted on

Compacting historical data in Clickhouse

In most cases you need full details on your data collected, so you don’t want to compact (store aggregated) your data. But there are plenty of cases, when you actually need only recent data in full perspective and historical data can be easily compacted.

E.g. you will only want to save, say, last month of collected user events in event-per-row form. But older data is fine to keep aggregated in total events per day format.

This can save space and reduce query execution times. Clickhouse can manage this automatically, let’s see how.

Top comments (0)

🌚 Friends don't let friends browse without dark mode.

Sorry, it's true.