A SELECT query started taking longer after you introduced Lightweight UPDATE.
Fastest next step: compare the same query before and after the update, then check patch parts, read-path behavior, and resource metrics before blaming NVMe or adding hardware.
This guide is for DBAs maintaining MergeTree tables that use Lightweight UPDATE.
It also helps data engineers assess whether update frequency and query patterns fit their table design.
If you are planning a database server, use the measurements to separate software-path limits from host limits.
Last updated October 19, 2026. Technical behavior was checked against the ClickHouse UPDATE documentation, its guide to handling updates, and the cited community report, which describes a specific reproduction rather than a general performance rule.
Build a comparable before-and-after baseline
Start with a query that represents a real workload, not a synthetic query chosen because it is easy to run. Save its SQL, filter values, selected columns, data range, and relevant settings. Re-run the same query shape after the update. If the dataset or filter range changes, you no longer have a clean comparison.
Control the test conditions as far as your production constraints allow. Run the samples in a similar workload window, and note concurrent queries, background merges, and recent data changes. A query that slows during a busy merge period does not, by itself, show that Lightweight UPDATE caused the change.
Use the query log to compare records for the selected query. ClickHouse documents fields such as query_duration_ms, read_rows, read_bytes, and memory_usage in its system.query_log reference. Compare the same query shape and interpret the fields together: a longer duration with similar reads suggests a different investigation than a longer duration accompanied by a large increase in data read.
For a starting point, adapt this query to your database, time window, and workload:
SELECT
event_time,
query_duration_ms,
read_rows,
read_bytes,
memory_usage,
query
FROM system.query_log
WHERE type = 'QueryFinish'
AND query LIKE 'SELECT%'
ORDER BY event_time DESC
LIMIT 50;
The sample filters for completed SELECT statements and shows recent records. Narrow it to your target query rather than treating the output as a benchmark. The query log is evidence about executions, not a substitute for holding the test conditions constant.
Record the query plan as well. ClickHouse's EXPLAIN reference documents plan inspection. For example, compare the plan for the same query before and after the update:
EXPLAIN indexes = 1
SELECT updated_column
FROM analytics.events
WHERE event_date = '2026-10-18';
Replace the table, column, and filter with your actual query. Save the plan output beside the query-log measurements. A plan can show how ClickHouse intends to execute a query, but you still need execution records to see what the query actually read.
Separate patch reads from base-data reads
Lightweight UPDATE uses patch parts to make changed values visible to queries. That is a documented mechanism, not a guarantee that every query will slow down. The relevant question is whether your SELECT reads updated columns or follows a path affected by patch application. The official UPDATE documentation linked above describes the mechanism and potential read-query costs.
Create two comparable query samples:
- One reads a column changed by the update.
- One reads an unchanged column, using the same table, filter, and data range where possible.
If the first query changes while the second remains broadly similar, patch application is a reasonable hypothesis to test. If both change, check for other differences, including query volume, data growth, merges, and host activity. Do not conclude that a patch caused the slowdown from a single elapsed-time value.
Also distinguish query-side work from background work. A query may read base data while ClickHouse processes parts in the background; the effects can overlap in time. Check active parts and merge state for the same observation window. The system.parts documentation describes part metadata, while system.merges covers active merges.
A basic parts summary can help you see whether active part counts or row totals changed across samples:
SELECT
database,
table,
partition,
countIf(active) AS active_parts,
sumIf(rows, active) AS active_rows
FROM system.parts
WHERE database = currentDatabase()
GROUP BY database, table, partition
ORDER BY active_parts DESC;
This summary is not, by itself, a patch-parts detector. Check the metadata and patch-identification method supported by your installed ClickHouse version before writing a patch-specific query. Do not infer patch status from a part name unless the relevant version documentation supports that interpretation.
| Observation | What it may indicate | What to verify next |
|---|---|---|
| Queries reading updated columns change more than comparable reads of unchanged columns | Patch application may be affecting that read path | Compare plans and read volume; repeat under similar load |
Query duration rises while read_rows and read_bytes stay similar |
Execution work or contention may have changed without a clear read-volume increase | Check CPU, memory, concurrent queries, and merge activity |
| Read volume rises and pruning appears weaker | A filter, index, or projection may no longer be helping as expected | Compare EXPLAIN output and actual rows read |
| Slow periods overlap with changing parts or active merges | Background part work may be contributing to the observed window | Repeat the query comparison when background activity differs |
Check pruning instead of assuming an index works
A table can have a skipping index or projection without a given query benefiting from it. Check whether the filter and selected columns allow ClickHouse to use the feature for that query, and whether the plan and execution measurements show a smaller read scope.
ClickHouse's skipping-index guidance explains how these indexes help eliminate data granules when their conditions match. Its projection documentation describes how projections can provide alternate data layouts for queries. Neither fact means every query will use an index or projection, or that an update necessarily disables one.
Compare these items before and after the update:
- The exact filter predicates and selected columns.
- The
EXPLAINoutput, including index-related information available for your version. read_rowsandread_bytesfor comparable executions.- Whether the updated column participates in the filter, grouping, ordering, or projection used by the query.
If the plan looks similar but actual reads differ, investigate the data and execution context. If the plan changes, confirm that the change aligns with the updated data and query shape. Avoid a conclusion based only on the presence of an index definition in the table schema.
A community report can help you form a test, but it cannot settle your production diagnosis. The cited issue report records a user-reported case with its own version and test context. Treat its reproduction as a lead to compare against your workload, not as a general statement about all ClickHouse versions, datasets, or queries.
Match the update pattern to the workload
Small updates are not automatically cheap just because each update changes a limited set of rows. Frequency, row distribution, affected columns, and query patterns all matter. ClickHouse's guide to handling updates, linked above, discusses trade-offs between update approaches. Check its guidance for your installed version before selecting a different mechanism.
| Update pattern | Candidate approach to evaluate | Main trade-off |
|---|---|---|
| Infrequent changes to a limited set of rows, with acceptable read measurements | Keep Lightweight UPDATE and continue monitoring representative queries | Validate that the read path remains acceptable as updates accumulate |
| Frequent small batches with repeated changes to the same table | Test combining changes into a planned batch | Fewer update operations may simplify the workload, but can increase freshness delay |
| Broad rewrites or changes affecting a large share of data | Compare a mutation-based approach or a data-model redesign | Rewriting data can increase write and background work; measure operational impact |
| Queries repeatedly need the newest value under a different access pattern | Review table design and whether a separate current-state representation fits | Adds modeling and consistency work; it is not a hardware-only choice |
Use a controlled test dataset or a production-safe window. Compare the same SELECT samples and update workload under each candidate. Keep the batch schedule aligned with how quickly your application must expose changes. A change that improves reads but violates freshness requirements is not a successful fix.
For each candidate, write down the operational condition that would make it acceptable. That might be a maximum delay before updated values become visible, a bound on the number of update batches, or a requirement that a particular read query stay within its established baseline. These are service requirements for your application, not performance claims that apply to all ClickHouse deployments.
FAQ: patch parts and read-query diagnosis
Why can SELECT queries slow down after a Lightweight UPDATE?
A Lightweight UPDATE makes changed values visible through patch parts, and queries that touch those values may need additional work to combine the patch with base data. The effect depends on the query, updated columns, and table state. Compare reads of updated and unchanged columns before concluding that patch parts explain a slowdown.
Can patch parts affect skipping indexes or projections?
They can affect whether indexes or projections help a particular read path, according to ClickHouse's update guidance. Verify with the query plan and actual rows or bytes read. An index definition does not prove that a query can use it effectively, and a community reproduction does not establish a universal slowdown.
How can I tell whether patch parts caused the slowdown?
Hold the query shape, filters, data range, and test conditions constant. Compare query-log measurements, plans, read volume, and patch or merge activity over the same observation window. A change isolated to queries reading updated columns is useful evidence, but repeat the test and check concurrent work before treating it as a cause.
Should I combine small ClickHouse UPDATE batches?
If frequent small updates coincide with measured patch-management or read-path overhead, test a less fragmented batch schedule. Keep the schedule within your freshness requirements, then compare it with mutation-based updates or a data-model change. If reads remain stable and updates are infrequent, batching can add complexity without addressing a proven problem.
Use host metrics to separate software limits from hardware limits
Measure host activity during the same query window as your before-and-after samples. Check CPU utilization, memory pressure, and disk activity alongside query-log and merge observations. A slower query alone does not prove that NVMe storage is the bottleneck; nor does a busy CPU prove that adding cores will fix patch-related work.
Use this decision branch to choose the next action:
- If queries reading updated columns change, while comparable reads and host metrics remain steady: investigate patch application, query shape, and update frequency first. Test a batch or data-model change before purchasing more capacity.
- If pruning weakens or actual read volume rises: check the plan, filter design, skipping-index use, and projection eligibility. Confirm the change against the installed version's documentation.
- If slow queries align with sustained CPU, memory, or storage pressure across relevant workloads: measure whether that resource remains constrained after accounting for merges and concurrency. Then test the workload on a candidate host using the same query samples.
- If the evidence is mixed or varies by test window: gather a repeatable sample before changing the production schema or committing to new hardware.
A database server decision should follow the measured bottleneck. For a candidate machine, replay representative reads and writes, record the same query and host metrics, and compare results under a realistic concurrency pattern. Avoid extrapolating from a one-off run or from a community result with a different dataset.
Physical hardware also does not replace durability planning. If you use direct-attached disks without hardware RAID, configure software redundancy or replication as appropriate, and keep backups outside the database host. Validate recovery rather than assuming that a successful backup job proves that restoration will work. You can use this restore-validation guide to review how to test restored data and metadata.
Choose dedicated hardware only after the evidence points to the host
If repeatable tests show that your current shared cloud instance is constrained by CPU contention, storage limits, or a disk layout you cannot control, an exclusive AMD physical server may be a better fit for a stable, sustained ClickHouse workload. Shared services can still be the right choice when you need rapid elasticity, have a light workload, or only run short-lived jobs; dedicated hardware is not a fix for inefficient patch handling or an unsuitable query plan.
When the software path is the limiting factor, adjust the update pattern or table design first. When measured host pressure remains the constraint, compare your own query samples against the actual options listed by qsfpcloud rather than assuming that a larger server will remove patch overhead. Review the available billing cycles as part of that procurement decision, and keep the backup and recovery plan separate from the hardware choice.
Frequently asked questions
Why can SELECT queries slow down after a Lightweight UPDATE?
A Lightweight UPDATE makes changed values visible through patch parts, and a query that touches those values may need additional work to combine the patch with base data. The effect depends on the query, updated columns, and current table state. Compare reads that access updated columns with otherwise similar reads that do not; do not treat every slower SELECT as proof that patch parts are the cause.
Can patch parts affect skipping indexes or projections?
They can affect whether indexes or projections help a particular read path, according to ClickHouse's update guidance. Verify this with the plan and the rows or bytes actually read for your query. An index existing on a table does not prove that the query can use it effectively after an update, and a single community reproduction does not establish a universal slowdown.
How do I tell whether patch parts caused the slowdown?
Use the same query shape, filters, data range, and test conditions before and after the update. Compare query-log measurements, the plan, actual read volume, and patch or merge activity for the same observation window. If only queries that read updated columns change, that is a useful clue, not conclusive proof; repeat the comparison while controlling concurrent work.
Should I combine small ClickHouse UPDATE batches?
If many small updates repeatedly touch the same table and the evidence shows patch-management or read-path overhead, test a less fragmented batch schedule. Keep batches bounded by your freshness and operational requirements, and compare the result with mutation-based updates or a data-model change. If updates are infrequent and affected reads remain stable, batching may add complexity without solving a measured problem.
Qsfp AMD EPYC 7543P dedicated server from $470.9/month