Which storage model does ClickHouse use to achieve high analytical query performance on large datasets?
Clickhouse Architecture
Question · Easy
In ClickHouse, what is a 'granule' in the context of MergeTree storage?
Question · Medium
What is the relationship between the ORDER BY clause and the PRIMARY KEY in a MergeTree table when PRIMARY KEY is not explicitly specified?
Mergetree Engines
Tech Exam Prep Podcast
Listen on Spotify
Podcast
A MergeTree table is defined with ORDER BY (tenant_id, event_date, user_id). A query filters only on user_id. What does ClickHouse do with the primary index for this query?
What is the purpose of PARTITION BY in a MergeTree table?
Which ClickHouse MergeTree engine variant removes duplicate rows with the same sorting key during background merge operations?
When using ReplacingMergeTree, a SELECT query returns duplicate rows even though they should have been removed. What is the most likely explanation?
SummingMergeTree collapses rows with the same sorting key by summing numeric columns. What happens to non-numeric columns that are not part of the sorting key during a merge?
AggregatingMergeTree stores aggregate function states in columns. Which ClickHouse data type is used to store such a state?
CollapsingMergeTree uses a sign column with values +1 and -1. What does inserting a row with sign = -1 accomplish?
What is a ClickHouse materialized view and when does it get populated?
Materialized Views
Which statement best describes ClickHouse projections compared to materialized views?
What does the PREWHERE clause do in a ClickHouse SELECT query?
Query Optimization
Which type of data-skipping index would you add to a MergeTree table to efficiently filter on a low-cardinality string column like status with values 'active', 'inactive', 'pending'?
A ClickHouse table has ORDER BY (country, event_type, timestamp). What does the minmax skip index on timestamp help with?
Question · Hard
What is the purpose of TTL (Time-To-Live) in a ClickHouse MergeTree table?
Which ClickHouse data type would you use to store a large number of distinct IP addresses efficiently, with the ability to perform prefix-based subnet filtering?
Data Types
What is the key difference between LowCardinality(String) and a plain String column in ClickHouse?
You want to insert data from an S3 bucket into a ClickHouse table. Which of the following approaches is most native to ClickHouse?
Data Ingestion
What is the role of a ClickHouse Dictionary?
Dictionaries
Which dictionary layout should you use for a large dictionary where you want the fastest possible point lookups and the dictionary fits in RAM?
What is the recommended approach for reading data from a Kafka topic into ClickHouse continuously?
ClickHouse supports multiple INSERT formats. Which format is most efficient for bulk loading large volumes of structured data?
What does the aggregate function combinator -If do in ClickHouse?
Aggregate Functions
Which ClickHouse function efficiently computes the approximate number of distinct values in a column with much lower memory usage than exact counting?
What is the ClickHouse quantile() function used for, and what is a key trade-off compared to quantileExact()?
In ClickHouse, what is the -State and -Merge combinator pattern used for?
What is the ReplicatedMergeTree engine and what coordination system does it require?
Replication Sharding
What is the role of a Distributed table engine in ClickHouse?
In a ClickHouse cluster with 2 shards and 2 replicas per shard, how many ReplicatedMergeTree table instances exist for one logical table?
What is ClickHouse Keeper and how does it differ from Apache ZooKeeper?
What does the sharding_key parameter control in a Distributed table definition?
When denormalizing data for ClickHouse, which design pattern is preferred over JOINs for dimension lookups at query time?
Data Modeling
A ClickHouse query runs a large JOIN between two tables. The right-hand table has 50 million rows. What is the most likely performance problem?
Which ClickHouse sampling clause allows you to query a deterministic fraction of data for approximate query processing?
What does the FINAL modifier do when querying a ReplacingMergeTree or CollapsingMergeTree table?
What is the default index_granularity in ClickHouse MergeTree tables?
Which ClickHouse table engine would you use to expose a MySQL table for read access within ClickHouse SQL queries?
What is the purpose of the Nullable(T) type modifier in ClickHouse, and why should it be used sparingly?
A ClickHouse table has TTL event_date + INTERVAL 30 DAY TO DISK 'cold_disk'. What happens to rows where event_date is older than 30 days?
Which ClickHouse function is used to perform a key lookup in a Dictionary?
What happens when you execute OPTIMIZE TABLE my_table FINAL in ClickHouse?
Which ClickHouse data format is best suited for exchanging data with Parquet-based data lakes?
A ClickHouse table stores event logs with ORDER BY (service_name, log_level, timestamp). Which query pattern benefits MOST from this ordering?
What is the Merge tree engine family's mechanism for handling data 'parts' and background merges?
What is the recommended maximum number of data parts per table in ClickHouse before query performance degrades significantly?
What is the difference between GLOBAL IN and IN when used with a subquery in a distributed ClickHouse query?
Loading more…