ClickHouse Queries


Helps to visualize most frequent, slowest, failed queries. Shows queries rate per second, table with last queries
Last updated: 5 years ago

Start with Grafana Cloud and the new FREE tier. Includes 10K series Prometheus or Graphite Metrics and 50gb Loki Logs

Downloads: 2851

Reviews: 2

  • top5.png
  • top_queries.png
  • request_charts.png

Dashboard based on information from ClickHouse system table system.query_log.
Template variables:

  • type - type of the query, documented in dashboard
  • top elements - number of elements to display; for example: top 5 or top 10
  • initial user - user who initiated query execution
  • query type - select or insert


  • Graph Top queries rate - graph shows top executed queries per second
  • Top slow queries - table shows slowest queries
  • Top memory consumers queries - table shows most memory expensive queries
  • Top failed queries - table shows failed queries ordered by count
  • Request charts - two graphs shows queries-per-second rate and query duration
  • Query log table - shows last executed queries

How to install

To enable ClickHouse query logging you will need to add <log_queries>1</log_queries> param into <profile> section to your user configuration section. For example:

  <!-- Profiles of settings. -->
        <!-- Default settings. -->

After this, ClickHouse should create table system.query_log.

Important: CH do not log values for insert queries

To query data from ClickHouse use

If you need to show queries from ClickHouse cluster - create distributed table. For example:

CREATE TABLE system.query_log_all AS system.query_log ENGINE = Distributed(<your_cluster_name>, system, query_log);
Get this dashboard: