Skip to content

Commit ad45241

Browse files
authored
Merge pull request #4151 from Blargian/lightweight_slug_update
Update lightweight-update slug
2 parents c7eccb4 + 3698996 commit ad45241

File tree

8 files changed

+16
-10
lines changed

8 files changed

+16
-10
lines changed

.github/workflows/check-build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ jobs:
2727
if: matrix.check_type == 'kbcheck'
2828
run: |
2929
curl -Ls https://astral.sh/uv/install.sh | sh
30-
uv python install 3.12
30+
uv clean
31+
uv python install 3.12 --verbose
3132
- name: Setup md-lint environment
3233
if: matrix.check_type == 'md-lint'
3334
uses: actions/setup-node@v3

docs/guides/developer/mutations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ delete existing data. These operations are labeled "mutations" and are executed
1515

1616
:::tip
1717
If you need to perform frequent updates, consider using [deduplication](../developer/deduplication.md) in ClickHouse, which allows you to update
18-
and/or delete rows without generating a mutation event. Alternatively, use [lightweight updates](/guides/developer/lightweight-update)
18+
and/or delete rows without generating a mutation event. Alternatively, use [lightweight updates](/docs/sql-reference/statements/update)
1919
or [lightweight deletes](/guides/developer/lightweight-delete)
2020
:::
2121

docs/guides/developer/lightweight-update.md renamed to docs/guides/developer/on-fly-mutations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
slug: /guides/developer/lightweight-update
2+
slug: /guides/developer/on-the-fly-mutations
33
sidebar_label: 'On-the-fly mutation'
44
title: 'On-the-fly Mutations'
55
keywords: ['On-the-fly mutation']
66
description: 'Provides a description of on-the-fly mutations'
77
---
88

9-
## On-the-fly mutations {#lightweight-update}
9+
## On-the-fly mutations {#on-the-fly-mutations}
1010

1111
When on-the-fly mutations are enabled, updated rows are marked as updated immediately and subsequent `SELECT` queries will automatically return with the changed values. When on-the-fly mutations are not enabled, you may have to wait for your mutations to be applied via a background process to see the changed values.
1212

docs/integrations/data-ingestion/etl-tools/dbt/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,7 @@ In this run, only the new rows are added straight to `imdb_dbt.actor_summary` ta
815815
816816
Historically ClickHouse has had only limited support for updates and deletes, in the form of asynchronous [Mutations](/sql-reference/statements/alter/index.md). These can be extremely IO-intensive and should generally be avoided.
817817
818-
ClickHouse 22.8 introduced [lightweight deletes](/sql-reference/statements/delete.md) and ClickHouse 25.7 introduced [lightweight updates](/guides/developer/lightweight-update). With the introduction of these features, modifications from single update queries, even when being materialized asynchronously, will occur instantly from the user's perspective.
818+
ClickHouse 22.8 introduced [lightweight deletes](/sql-reference/statements/delete.md) and ClickHouse 25.7 introduced [lightweight updates](/sql-reference/statements/update). With the introduction of these features, modifications from single update queries, even when being materialized asynchronously, will occur instantly from the user's perspective.
819819
820820
This mode can be configured for a model via the `incremental_strategy` parameter i.e.
821821

docs/managing-data/updating-data/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ In this section of the documentation, you will learn how you can update your dat
1111
|-------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|
1212
| [Overview](/updating-data/overview) | Provides an overview of the differences in updating data between ClickHouse and OLTP databases, as well as the various methods available to do so in ClickHouse. |
1313
| [Update mutations](/managing-data/update_mutations) | Learn how to update using Update Mutations. |
14-
| [Lightweight updates](/guides/developer/lightweight-update) | Learn how to update using Lightweight Updates. |
14+
| [Lightweight updates](/docs/sql-reference/statements/update) | Learn how to update using Lightweight Updates. |
1515
| [ReplacingMergeTree](/guides/replacing-merge-tree) | Learn how to update using the ReplacingMergeTree. |

docs/managing-data/updating-data/overview.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ In summary, update operations should be issued carefully, and the mutations queu
2222
|---------------------------------------------------------------------------------------|--------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
2323
| [Update mutation](/sql-reference/statements/alter/update) | `ALTER TABLE [table] UPDATE` | Use when data must be updated to disk immediately (e.g. for compliance). Negatively affects `SELECT` performance. |
2424
| [Lightweight updates](/sql-reference/statements/update) | `UPDATE [table] SET ... WHERE` | Use for updating small amounts of data (up to ~10% of table). Creates patch parts for immediate visibility without rewriting entire columns. Adds overhead to `SELECT` queries but has predictable latency. Currently experimental. |
25-
| [On-the-fly updates](/guides/developer/lightweight-update) | `ALTER TABLE [table] UPDATE` | Enable using `SET apply_mutations_on_fly = 1;`. Use when updating small amounts of data. Rows are immediately returned with updated data in all subsequent `SELECT` queries but are initially only internally marked as updated on disk. |
25+
| [On-the-fly updates](/guides/developer/on-the-fly-mutations) | `ALTER TABLE [table] UPDATE` | Enable using `SET apply_mutations_on_fly = 1;`. Use when updating small amounts of data. Rows are immediately returned with updated data in all subsequent `SELECT` queries but are initially only internally marked as updated on disk. |
2626
| [ReplacingMergeTree](/engines/table-engines/mergetree-family/replacingmergetree) | `ENGINE = ReplacingMergeTree` | Use when updating large amounts of data. This table engine is optimized for data deduplication on merges. |
2727
| [CollapsingMergeTree](/engines/table-engines/mergetree-family/collapsingmergetree) | `ENGINE = CollapsingMergeTree(Sign)` | Use when updating individual rows frequently, or for scenarios where you need to maintain the latest state of objects that change over time. For example, tracking user activity or article stats. |
2828
Here is a summary of the different ways to update data in ClickHouse:
@@ -84,9 +84,9 @@ WHERE Id = 404346
8484
1 row in set. Elapsed: 0.149 sec. Processed 59.55 million rows, 259.91 MB (399.99 million rows/s., 1.75 GB/s.)
8585
```
8686

87-
Note that for on-the-fly updates, a mutation is still used to update the data; it is just not materialized immediately and applied during `SELECT` queries. It will still be applied in the background as an asynchronous process and incurs the same heavy overhead as a mutation and thus is an I/O intense operation that should be used sparingly. The expressions that can be used with this operation are also limited (see here for [details](/guides/developer/lightweight-update#support-for-subqueries-and-non-deterministic-functions)).
87+
Note that for on-the-fly updates, a mutation is still used to update the data; it is just not materialized immediately and applied during `SELECT` queries. It will still be applied in the background as an asynchronous process and incurs the same heavy overhead as a mutation and thus is an I/O intense operation that should be used sparingly. The expressions that can be used with this operation are also limited (see here for [details](/guides/developer/on-the-fly-mutations#support-for-subqueries-and-non-deterministic-functions)).
8888

89-
Read more about [on-the-fly updates](/guides/developer/lightweight-update).
89+
Read more about [on-the-fly updates](/guides/developer/on-the-fly-mutations).
9090

9191
## `CollapsingMergeTree` {#collapsing-merge-tree}
9292

sidebars.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1123,7 +1123,7 @@ const sidebars = {
11231123
{
11241124
type: "doc",
11251125
label: "Lightweight Updates",
1126-
id: "guides/developer/lightweight-update"
1126+
id: "guides/developer/on-fly-mutations"
11271127
},
11281128
{
11291129
type: "doc",

vercel.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3365,6 +3365,11 @@
33653365
"source": "/docs/integrations/migration/upload-a-csv-file",
33663366
"destination": "/docs/cloud/migrate/upload-a-csv-file",
33673367
"permanent": true
3368+
},
3369+
{
3370+
"source": "/guides/developer/lightweight-update",
3371+
"destination": "/guides/developer/on-the-fly-mutations",
3372+
"permanent": true
33683373
}
33693374
]
33703375
}

0 commit comments

Comments
 (0)