Open Tiaonmmn opened 4 months ago
Could you please share the EXPLAIN PLAN INDEXES = 1
output?
Also, it'd be useful if you share logs for these queries.
Could you please share the
EXPLAIN PLAN INDEXES = 1
output? Also, it'd be useful if you share logs for these queries.
What log? Do you mean outputs in clickhouse-server.log? But there are so many rows per second, how can I filter the query log?
@Tiaonmmn The whole server log is not required. Only logs for a specific query are enough. Each query has a unique query_id
. It's printed out in clickhouse-client
when you run the query. Afterward, you can filter server logs using query_id
.
Please set this parameter in clickhouse-client before running your query(SQL):
:) set send_logs_level='trace';
Then the following output is what @novikd wants. :)
Describe the situation The same query works differently with settings allow_experimental_analyzer=1 and 0.
How to reproduce
Which ClickHouse server version to use ClickHouse version 24.3.5.46
CREATE TABLE
statements for all tables involvedThe DDL of Distributed table:
The DDL of the underlying base table:
Expected performance When allow_experimental_analyzer = 0, the query can finish in less than 3 seconds.When allow_experimental_analyzer = 1, the query will last for at least 5 minute. with the network load monitor, I can see that allow_experimental_analyzer = 1 causes too much network traffic, seems like that it's reading the whole table content.
Additional context The explain with allow_experimental_analyzer = 0:
The explain with allow_experimental_analyzer = 1: