SQLancer
← All Database Flashcards Library / Flashcards / ClickHouse
🍒 ClickHouse Knowledge Base

ClickHouse Study Flashcards

Column-oriented open-source relational database built for online analytical processing (OLAP). Click any card to flip and test your knowledge.

Card 1 of 10 Table Engines

What is MergeTree in ClickHouse?

Click Card to Reveal Answer ↷
Answer ClickHouse

The default and most powerful table engine family, featuring primary key indexing, partition pruning, and background data merging.

Click to Flip Back ↶
Card 2 of 10 Architecture

Why is ClickHouse column-oriented?

Click Card to Reveal Answer ↷
Answer ClickHouse

Columnar storage reads only queried columns from disk, dramatically accelerating analytical aggregation queries over billions of rows.

Click to Flip Back ↶
Card 3 of 10 Indexing

How does Primary Key work in ClickHouse MergeTree?

Click Card to Reveal Answer ↷
Answer ClickHouse

Primary keys do not enforce row uniqueness; instead, they create a sparse index pointing to data mark ranges.

Click to Flip Back ↶
Card 4 of 10 Engines

What is ReplacingMergeTree?

Click Card to Reveal Answer ↷
Answer ClickHouse

A table engine that asynchronously deduplicates rows matching the primary key in background merges.

Click to Flip Back ↶
Card 5 of 10 Engines

What is SummingMergeTree?

Click Card to Reveal Answer ↷
Answer ClickHouse

A specialized table engine that automatically sums numeric columns sharing the same primary key during background merges.

Click to Flip Back ↶
Card 6 of 10 Performance

What is vector execution in ClickHouse?

Click Card to Reveal Answer ↷
Answer ClickHouse

Processing data in memory blocks (vectors) using SIMD CPU instructions for high query execution performance.

Click to Flip Back ↶
Card 7 of 10 Views

What is a Materialized View in ClickHouse?

Click Card to Reveal Answer ↷
Answer ClickHouse

Stores transformed rows continuously as data is inserted into the source table, avoiding query-time computation.

Click to Flip Back ↶
Card 8 of 10 Array Functions

What does arrayJoin() do?

Click Card to Reveal Answer ↷
Answer ClickHouse

It expands array elements into individual result output rows, similar to MongoDB's $unwind.

Click to Flip Back ↶
Card 9 of 10 Optimization

How does Partition Pruning work?

Click Card to Reveal Answer ↷
Answer ClickHouse

Skipping unneeded data partition files based on WHERE conditions matching the PARTITION BY expression.

Click to Flip Back ↶
Card 10 of 10 Introspection

What is the system.parts table?

Click Card to Reveal Answer ↷
Answer ClickHouse

A system catalog table providing metrics about physical MergeTree table parts, sizes, and row counts.

Click to Flip Back ↶

Need practical SQL queries for ClickHouse?

Explore our ready-to-use copy-paste query recipes in the Cookbook.

View ClickHouse Cookbook →