ClickHouse DB exposes per query stats in system.query_log which can be enabled by setting log_queries=1. This table has info about query duration, memory used, rows read/written, bytes read/written etc. These stats shall be grouped based on table & query type (insert/select).