v.24.12Improvement

Add MergeTreeIndexGranularityInternalArraysTotalSize Metric to system.metrics

Add the new MergeTreeIndexGranularityInternalArraysTotalSize metric to system.metrics. This metric is needed to find the instances with huge datasets susceptible to the high
Introduces the new MergeTreeIndexGranularityInternalArraysTotalSize metric in the system.metrics table.

Why it matters

This metric helps identify ClickHouse instances with very large datasets that are at risk of high memory usage due to large internal arrays in MergeTree index granularity structures.

How to use it

Query the system.metrics table to monitor the MergeTreeIndexGranularityInternalArraysTotalSize metric value. Use this information to diagnose and optimize memory consumption related to large datasets in MergeTree tables.