In this article, we will show you how you can monitor your expensive queries in ClickHouse via Python.
You will get an output of queries that use max_memory_usage.
First, download a related file from the command below:
git clone https://github.com/ChistaDATA/Monitoring-ClickHouse-Queries
Then open your code editor and edit related fields:
conn = clickhouse_driver.connect( host='localhost', port=9000, user='default', password='', database='default' )
Now you can run the script
python listQueries.py or python3 listQueries.py