New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ReadFromMergeTree use MinMax index before Partition key to filter parts #48093
Comments
Actually, the |
Yes, I understand that the MinMax index here is based on the minimum and maximum values of each column in the data part, which is determined by the partition key. However, this approach requires checking all data parts in the first step. Wouldn't it be more natural and efficient to first locate the corresponding data part based on the partition key and then further filter using MinMax within those data parts? Or is there any special concern here? |
it's the same. To locate the corresponding data part based on the partition key requires checking all data parts in the first step. Partition pruning checks all parts. |
It looks like that Clickhouse always creates a Minmax index on datatime columns if these columns are part of partition key. above is my guess. is that right? |
yes, i think so |
I have created a table which use DateTime as Partition Key
and try to query one row, just for test
the
explain
show ClickHouse use MinMax to filter parts first, then use Partition key to find corresponding partsI would like to know why not use Partition key first as it seems more efficient
thanks
The text was updated successfully, but these errors were encountered: