> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-fix-nav-issues.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> Overview page of Performance and Optimizations

# Performance and Optimizations

This section contains tips and best practices for improving performance with ClickHouse.
We recommend users read [Core Concepts](/concepts/core-concepts/parts) as a precursor to this section,
which covers the main concepts required to improve performance.

| Topic                                                                                        | Description                                                                                                                                                       |
| -------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Query optimization guide](/guides/clickhouse/performance-and-monitoring/query-optimization) | Start here for query optimization fundamentals, covering common scenarios and performance techniques to improve query execution speed.                            |
| [Primary indexes advanced guide](/guides/clickhouse/data-modelling/sparse-primary-indexes)   | Deep dive into ClickHouse's unique sparse primary indexing system, how it differs from traditional databases, and best practices for optimal indexing strategies. |
| [Query parallelism](/concepts/core-concepts/query-parallelism)                               | Learn how ClickHouse parallelizes query execution using processing lanes and `max_threads` settings, including how to inspect and optimize parallel execution.    |
| [Partitioning key](/concepts/best-practices/partitioning-keys)                               | Master partition key selection to dramatically improve query performance by enabling efficient data segment pruning and avoiding common partitioning pitfalls.    |
| [Data skipping indexes](/concepts/features/performance/skip-indexes/skipping-indexes)        | Apply secondary indexes strategically to skip irrelevant data blocks and accelerate filtered queries on non-primary key columns.                                  |
| [`PREWHERE` optimization](/concepts/features/performance/prewhere)                           | Understand how `PREWHERE` automatically reduces I/O by filtering data before reading unnecessary columns, plus how to monitor its effectiveness.                  |
| [Bulk inserts](/concepts/features/operations/insert/bulkinserts)                             | Maximize ingestion throughput and reduce resource overhead by batching data insertions effectively.                                                               |
| [Asynchronous inserts](/concepts/features/operations/insert/asyncinserts)                    | Improve insert performance by leveraging server-side batching to reduce client-side complexity and increase throughput for high-frequency insertions.             |
| [Avoid mutations](/concepts/best-practices/avoid-mutations)                                  | Design append-only workflows that eliminate costly `UPDATE` and `DELETE` operations while maintaining data accuracy and performance.                              |
| [Avoid nullable columns](/concepts/best-practices/avoidnullablecolumns)                      | Reduce storage overhead and improve query performance by using default values instead of nullable columns where possible.                                         |
| [Avoid `OPTIMIZE FINAL`](/concepts/best-practices/avoid-optimize-final)                      | Understand when you should and shouldn't use `OPTIMIZE TABLE FINAL`                                                                                               |
| [Analyzer](/guides/clickhouse/performance-and-monitoring/analyzer)                           | Leverage ClickHouse's new query analyzer to identify performance bottlenecks and optimize query execution plans for better efficiency.                            |
| [Query profiling](/concepts/features/performance/troubleshoot/sampling-query-profiler)       | Use the sampling query profiler to analyze query execution patterns, identify performance hot spots, and optimize resource usage.                                 |
| [Query cache](/concepts/features/performance/caches/query-cache)                             | Accelerate frequently executed `SELECT` queries by enabling and configuring ClickHouse's built-in query result caching.                                           |
| [Testing hardware](/concepts/features/performance/troubleshoot/performance-test)             | Run ClickHouse performance benchmarks on any server without installation to evaluate hardware capabilities. (Not applicable to ClickHouse Cloud)                  |
