To investigate high RAM usage in ClickHouse and determine what's consuming so much memory, you can try the following steps:
-
Check system tables: Query the system.metrics and system.asynchronous_metrics tables to get an overview of memory usage:
SELECT * FROM system.metrics WHERE metric LIKE '%Memory%'; SELECT * FROM system.asynchronous_metrics WHERE metric LIKE '%Memory%';