Skip to content

Commit a596124

Browse files
Merge pull request #3043 from ClickHouse/standard_image_width
Align diagram widths.
2 parents dc04cab + 3a43c21 commit a596124

File tree

5 files changed

+3
-3
lines changed

5 files changed

+3
-3
lines changed
1.69 MB
Loading
1.53 MB
Loading
183 KB
Loading

docs/en/managing-data/core-concepts/partitions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Note that with partitioning enabled, ClickHouse automatically creates [MinMax in
4545

4646
Further note that with partitioning enabled, ClickHouse only [merges](/docs/en/parts) data parts within, but not across partitions. We sketch that for our example table from above:
4747

48-
<img src={require('./images/merges_with_partitions.png').default} alt='PART MERGES' class='image' style={{width: '50%'}} />
48+
<img src={require('./images/merges_with_partitions.png').default} alt='PART MERGES' class='image' style={{width: '100%'}} />
4949
<br/>
5050

5151
As sketched in the diagram above, parts belonging to different partitions are never merged. If a partition key with high cardinality is chosen, then parts spread across thousands of partitions will never be merge candidates - exceeding preconfigured limits and causing the dreaded `Too many parts` error. Addressing this problem is simple: choose a sensible partition key with [cardinality under 1000..10000](https://github.com/ClickHouse/ClickHouse-beta/blob/c35751b5f86edaaf6fa144182b955678e56bf30a/src/Storages/MergeTree/MergeTreeDataWriter.cpp#L79).
@@ -154,7 +154,7 @@ The query runs over our example table from above and [calculates](https://sql.cl
154154

155155
ClickHouse processes that query by applying a sequence of pruning techniques to avoid evaluating irrelevant data:
156156

157-
<img src={require('./images/partition-pruning.png').default} alt='PART MERGES' class='image' style={{width: '70%'}} />
157+
<img src={require('./images/partition-pruning.png').default} alt='PART MERGES' class='image' style={{width: '100%'}} />
158158
<br/>
159159

160160
**Partition pruning**: [MinMax indexes](/docs/en/partitions#what-are-table-partitions-in-clickhouse) are used to ignore whole partitions (sets of parts) that logically can't match the query's filter on columns used in the table's partition key.

docs/en/managing-data/core-concepts/parts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Data parts are self-contained, including all metadata needed to interpret their
4949

5050
To manage the number of parts per table, a background merge job periodically combines smaller parts into larger ones until they reach a [configurable](/docs/en/operations/settings/merge-tree-settings#max-bytes-to-merge-at-max-space-in-pool) compressed size (typically ~150 GB). Merged parts are marked as inactive and deleted after a [configurable](/docs/en/operations/settings/merge-tree-settings#old-parts-lifetime) time interval. Over time, this process creates a hierarchical structure of merged parts, which is why it’s called a MergeTree table:
5151

52-
<img src={require('./images/merges.png').default} alt='PART MERGES' class='image' style={{width: '50%'}} />
52+
<img src={require('./images/merges.png').default} alt='PART MERGES' class='image' style={{width: '100%'}} />
5353
<br/>
5454

5555
To minimize the number of initial parts and the overhead of merges, database clients are [encouraged](https://clickhouse.com/blog/asynchronous-data-inserts-in-clickhouse#data-needs-to-be-batched-for-optimal-performance) to either insert tuples in bulk, e.g. 20,000 rows at once, or to use the [asynchronous insert mode](https://clickhouse.com/blog/asynchronous-data-inserts-in-clickhouse), in which ClickHouse buffers rows from multiple incoming INSERTs into the same table and creates a new part only after the buffer size exceeds a configurable threshold, or a timeout expires.

0 commit comments

Comments
 (0)