Clickhouse queries - low memory usage

704 views
Skip to first unread message

sparsh sidana

unread,
Jul 17, 2019, 7:18:05 PM7/17/19
to ClickHouse
I've run  complex select query on my table involving joins. When I do a show processList it shows the following data:

Peak Memory Usage: 195005658
memory usage: 169827955
total rows approx: 186523648
read bytes: 451899808
read rows: 78696623

At the end of the query i get this output:
5 rows in set. Elapsed: 7.340 sec. Processed 369.17 million rows, 2.25 GB (50.30 million rows/s., 306.23 MB/s.)

It takes 7.3 sec to execute the query. I am trying to figure out why the memory utilization is low while running the query and is there way that I could increase it so that the performance improves?

Also, I haven't set any max memory utilization parameters in configs. It's using the default value




Maxim Ulanovskiy

unread,
Jul 17, 2019, 7:47:02 PM7/17/19
to sparsh sidana, ClickHouse
Hi Sparsh,

By default, CH allows 10GB per query.
Your query just doesn't need that much RAM and performance issues are due to other reasons.

You should rather look into query/schema optimization.
One thing I can say right away is that JOIN is one of the most resource-intensive operations for any DB and Clickhouse offers a few ways to optimize it e.g. Dictionaries.

Regards,
Max

--
You received this message because you are subscribed to the Google Groups "ClickHouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clickhouse+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/clickhouse/c8838640-5f8d-4f0c-a4a0-a52ba9b894b2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages