Skip to content

Commit 7e4c38e

Browse files
committed
Optimize system.tables for *_mutations access
Request it only if those columns has been requested. Note, that the main motivation was to fix private CI, since for SMT one of the tests fails. Fixes: ClickHouse#78515
1 parent b23e902 commit 7e4c38e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Storages/System/StorageSystemTables.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,9 @@ class TablesBlockSource : public ISource
718718

719719
if (table_merge_tree)
720720
{
721-
auto mutation_counters = table_merge_tree->getMutationCounters();
721+
MutationCounters mutation_counters;
722+
if (columns_mask[src_index] || columns_mask[src_index + 1] || columns_mask[src_index + 2])
723+
mutation_counters = table_merge_tree->getMutationCounters();
722724

723725
if (columns_mask[src_index++])
724726
res_columns[res_index++]->insert(mutation_counters.num_data);

0 commit comments

Comments
 (0)