Home / Companies / ClickHouse / Blog / Post Details
Content Deep Dive

Handling Updates and Deletes in ClickHouse

Blog post from ClickHouse

Post Details
Company
Date Published
Author
Denys Golotiuk
Word Count
2,926
Company Posts That Month
12
Language
English
Hacker News Points
-
Post removed?
No
Summary

ClickHouse, the world's fastest database for real-time analytics, offers multiple ways to efficiently update and delete data in analytical environments, depending on the specific use case. Lightweight Deletes via the DELETE FROM syntax are the most efficient way to remove data from ClickHouse, but may not provide immediate disk space savings if deleted data "exists" on disk. Mutation-based deletes via ALTER...DELETE can be used when immediate disk space savings are required, such as for compliance purposes. Updates and deletes can also be performed using ALTER...UPDATE and ALTER...DELETE mutations, respectively, which are asynchronous by default but can be made synchronous with the mutations_sync parameter set to 1 or 2. Other methods include using TTLs (time-to-live) for regular data removal, CollapsingMergeTree for frequent updates or removal of individual rows, ReplacingMergeTree for upsert operations based on versioning, and dropping partitions when removing large blocks of data regularly. Additionally, creating new columns and dropping old ones can be a more efficient way to update entire tables.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Real-time 1 1,696 483 160 +14%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.