Skip to main content
This section provides the best practices you will want to follow to get the most out of ClickHouse.

Choosing a primary key

How to choose a primary key in ClickHouse.

Selecting data types

How to choose the right data types for your columns.

Use materialized views

Shift computation from query time to insert time with materialized views.

Minimize and optimize JOINs

Best practices for using JOINs in ClickHouse.

Choosing a partitioning key

How to choose a partitioning key.

Selecting an insert strategy

How to choose an insert strategy, including bulk and asynchronous inserts.

Use data skipping indices where appropriate

How and when to use data skipping indices.

Avoid mutations

Why you should avoid mutations in ClickHouse.

Avoid OPTIMIZE FINAL

Why you should avoid OPTIMIZE TABLE ... FINAL.

Avoid nullable columns

Why nullable columns should be avoided in ClickHouse.

Use JSON where appropriate

When to use the JSON data type.
Last modified on July 10, 2026