From 74a0c3d545346febc52eb5d9fa645f5186b42c5d Mon Sep 17 00:00:00 2001 From: ivanmorozov333 Date: Mon, 23 Sep 2024 17:36:42 +0300 Subject: [PATCH] TPortionInfo::GetRecordsCount speed up (#9614) --- ydb/core/tx/columnshard/engines/portions/portion_info.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ydb/core/tx/columnshard/engines/portions/portion_info.h b/ydb/core/tx/columnshard/engines/portions/portion_info.h index 6fa105745b05..1591765f83e6 100644 --- a/ydb/core/tx/columnshard/engines/portions/portion_info.h +++ b/ydb/core/tx/columnshard/engines/portions/portion_info.h @@ -518,6 +518,8 @@ class TPortionInfo { if (!columnIdFirst || *columnIdFirst == i.ColumnId) { result += i.GetMeta().GetNumRows(); columnIdFirst = i.ColumnId; + } else { + break; } } return result;