Clickhouse: What does the tailing number of system.query_log_N mean?

Created on 29 Jul 2020  ยท  2Comments  ยท  Source: ClickHouse/ClickHouse

ClickHouse is an excellent OLAP database

While I'm looking for the slow queries, I found many query_log_N and query_thread_log_N tables.


SHOW TABLES

...
โ”‚ query_log                      โ”‚
โ”‚ query_log_0                    โ”‚
โ”‚ query_log_1                    โ”‚
โ”‚ query_log_2                    โ”‚
โ”‚ query_log_3                    โ”‚
โ”‚ query_log_4                    โ”‚
โ”‚ query_thread_log               โ”‚
โ”‚ query_thread_log_0             โ”‚
โ”‚ query_thread_log_1             โ”‚
โ”‚ query_thread_log_2             โ”‚
โ”‚ query_thread_log_3             โ”‚
โ”‚ query_thread_log_4             โ”‚
...

I am developing a monitoring system for slow queries and considered to use the query_log table,

but there are other tables with the same postfix of names.

I wonder what the tailing numbers of tables mean.

Thank you.

question question-answered

Most helpful comment

It's renamed after each CH upgrade which changes table's schema

All 2 comments

It's renamed after each CH upgrade which changes table's schema

@den-crane
Thank you for your answer.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zhicwu picture zhicwu  ยท  3Comments

jangorecki picture jangorecki  ยท  3Comments

derekperkins picture derekperkins  ยท  3Comments

jangorecki picture jangorecki  ยท  3Comments

goranc picture goranc  ยท  3Comments