Search code examples
clickhouse

How to know how much memory is used by a query in clickhouse


I am trying to test performance of clickhouse to get sense how much memory i need for a dedicated server. Currently I'm using PostgreSQL in production and now I want to migrate to clickhouse, so I inserted some of production data into a clickhouse server locally and executing the most used queries on production on clickhouse. But I do not know how much memory does clickhouse use to execute these queries.


Solution

  • After some research I found the answer hope it help others. clickhouse has table called 'system.query_log' that is used for storing statistics of each executed query like duration or memory usage system.query_log

    also there is table 'system.processes' that has information about current queries system.processes