You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|[Query Optimization Guide](/optimize/query-optimization)| A good place to start for query optimization, this simple guide describes common scenarios of how to use different performance and optimization techniques to improve query performance. |
17
17
|[Primary Indexes Advanced Guide](/guides/best-practices/sparse-primary-indexes)| A deep dive into ClickHouse indexing including how it differs from other DB systems, how ClickHouse builds and uses a table's spare primary index and what some of the best practices are for indexing in ClickHouse. |
18
18
|[Query Parallelism](/optimize/query-parallelism)| Explains how ClickHouse parallelizes query execution using processing lanes and the max_threads setting. Covers how data is distributed across lanes, how max_threads is applied, when it isn't fully used, and how to inspect execution with tools like EXPLAIN and trace logs. |
@@ -23,7 +23,7 @@ which covers the main concepts required to improve performance.
23
23
|[Asynchronous Inserts](/optimize/asynchronous-inserts)| Focuses on ClickHouse's asynchronous inserts feature. It likely explains how asynchronous inserts work (batching data on the server for efficient insertion) and their benefits (improved performance by offloading insert processing). It might also cover enabling asynchronous inserts and considerations for using them effectively in your ClickHouse environment. |
24
24
|[Avoid Mutations](/optimize/avoid-mutations)| Discusses the importance of avoiding mutations (updates and deletes) in ClickHouse. It recommends using append-only inserts for optimal performance and suggests alternative approaches for handling data changes. |
25
25
|[Avoid nullable columns](/optimize/avoid-nullable-columns)| Discusses why you may want to avoid nullable columns to save space and increase performance. Demonstrates how to set a default value for a column. |
26
-
|[Avoid Optimize Final](/optimize/avoidoptimizefinal)| Explains how the `OPTIMIZE TABLE ... FINAL` query is resource-intensive and suggests alternative approaches to optimize ClickHouse performance. |
26
+
|[Avoid `OPTIMIZE FINAL`](/optimize/avoidoptimizefinal)| Explains how the `OPTIMIZE TABLE ... FINAL` query is resource-intensive and suggests alternative approaches to optimize ClickHouse performance. |
27
27
|[Analyzer](/operations/analyzer)| Looks at the ClickHouse Analyzer, a tool for analyzing and optimizing queries. Discusses how the Analyzer works, its benefits (e.g., identifying performance bottlenecks), and how to use it to improve your ClickHouse queries' efficiency. |
28
28
|[Query Profiling](/operations/optimizing-performance/sampling-query-profiler)| Explains ClickHouse's Sampling Query Profiler, a tool that helps analyze query execution. |
29
29
|[Query Cache](/operations/query-cache)| Details ClickHouse's Query Cache, a feature that aims to improve performance by caching the results of frequently executed `SELECT` queries. |
Copy file name to clipboardExpand all lines: docs/guides/developer/deduplication.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -105,7 +105,9 @@ FINAL
105
105
The result only has 2 rows, and the last row inserted is the row that gets returned.
106
106
107
107
:::note
108
-
Using `FINAL` works OK if you have a small amount of data. If you are dealing with a large amount of data, using `FINAL` is probably not the best option. Let's discuss a better option for finding the latest value of a column...
108
+
Using `FINAL` works okay if you have a small amount of data. If you are dealing with a large amount of data,
109
+
using `FINAL` is probably not the best option. Let's discuss a better option for
Copy file name to clipboardExpand all lines: docs/guides/developer/replacing-merge-tree.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -220,7 +220,11 @@ Peak memory usage: 8.14 MiB.
220
220
221
221
## FINAL performance {#final-performance}
222
222
223
-
The `FINAL` operator will have a performance overhead on queries despite ongoing improvements. This will be most appreciable when queries are not filtering on primary key columns, causing more data to be read and increasing the deduplication overhead. If users filter on key columns using a `WHERE` condition, the data loaded and passed for deduplication will be reduced.
223
+
The `FINAL` operator does have a small performance overhead on queries.
224
+
This will be most noticeable when queries are not filtering on primary key columns,
225
+
causing more data to be read and increasing the deduplication overhead. If users
226
+
filter on key columns using a `WHERE` condition, the data loaded and passed for
227
+
deduplication will be reduced.
224
228
225
229
If the `WHERE` condition does not use a key column, ClickHouse does not currently utilize the `PREWHERE` optimization when using `FINAL`. This optimization aims to reduce the rows read for non-filtered columns. Examples of emulating this `PREWHERE` and thus potentially improving performance can be found [here](https://clickhouse.com/blog/clickhouse-postgresql-change-data-capture-cdc-part-1#final-performance).
0 commit comments