1 · INTERNALS · GLOSSARY 2/2
Glossary: changes and queries
TERM
WHAT IS IT, AND HOW IS IT DIFFERENT FROM TRADITIONAL DBMSs?
LAB EXAMPLE
Atomicity
An INSERT statement is either fully visible or not at all within a block
one INSERT = one block
Mutation
ALTER … UPDATE / DELETE: asynchronously updates parts
ALTER TABLE … UPDATE
Deletion
DELETE FROM marks the rows; the merge physically removes them
_row_exists = 0
Upsert
No ON CONFLICT: ReplacingMergeTree and FINAL on read
match_results
Deduplication
removes row versions on merge and repeated insert blocks
window = 100 blocks
FINAL
uses merge logic during reading; more CPU- and memory-intensive
SELECT … FINAL
Materialized view
incremental: query for each new block → table
daily_stats_mv
TTL
delete, move or roll up data by age, during merges
ts + 90-DAY INTERVAL
ClickHouse is a column-oriented database management system (DBMS) for analytics (OLAP). It reads many rows but few columns; writes in batches; and rarely modifies stored data.