Skip to content

Commit 29e3f7d

Browse files
committed
add knowledgebase article on OOM queries
1 parent 0d0f447 commit 29e3f7d

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

knowledgebase/memory-limit-exceeded-for-query.mdx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ keywords: ['OOM', 'memory limit exceeded']
99
{frontMatter.description}
1010
{/* truncate */}
1111

12+
import IdealImage from "@theme/IdealImage";
13+
import joins from '@site/static/images/knowledgebase/memory-limit-exceeded-for-query.png';
14+
1215
## Memory limit exceeded for query {#troubleshooting-out-of-memory-issues}
1316

1417
As a new user, ClickHouse can often seem like magic - every query is super fast,
@@ -61,9 +64,13 @@ impossible, e.g. a complex subquery. In this case, both the right and left side
6164
are sorted on disk if they do not fit in memory, allowing large tables to be
6265
joined.
6366

67+
<Image img={joins} size="md" alt="Joins algorithms"/>
6468

65-
66-
67-
69+
Since 20.3, ClickHouse has supported an auto value for the `join_algorithm` setting.
70+
This instructs ClickHouse to apply an adaptive join approach, where the hash-join
71+
algorithm is preferred until memory limits are violated, at which point the
72+
partial_merge algorithm is attempted. Finally, concerning joins, we encourage
73+
readers to be aware of the behavior of distributed joins and how to minimize
74+
their memory consumption. More information can be found [here](/sql-reference/operators/in#distributed-subqueries).
6875

6976

123 KB
Loading

0 commit comments

Comments
 (0)