Repository navigation
Enable count_distinct_optimization by default - #88281
Algunenano wants to merge 3 commits into
Conversation
|
Workflow [PR], commit [0512bbf] Summary: ❌
|
|
Some notes about this:
I'll need to investigate more and compare profiles with and without the optimization, because it seems both are suboptimal in different cases |
|
This is ok: it counts distinct values and types - this semantic is reasonable. |
|
Dear @Algunenano, this PR hasn't been updated for a while. Will you continue working on it? If not, please close it. Otherwise, ignore this message. |
|
Dear @Algunenano, this PR hasn't been updated for a while. Will you continue working on it? If not, please close it. Otherwise, ignore this message. |
|
Continued in #104472 with an update, the fix for distributed queries, and more tests. |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Improve performance of some countDistinct queries by enabling the setting
count_distinct_optimizationby default. This setting rewrites queries in the shape ofSELECT countDistinct(a) FROM tintoSELECT count() FROM (SELECT a FROM t GROUP BY a).Proposed by @amosbird in #81944
Documentation entry for user-facing changes