Is your feature request related to a problem or challenge? Please describe what you are trying to do.
ClickBench reported a performance drop for COUNT(DISTINCT) computation #5276 (comment)
Describe the solution you'd like
Its needed to investigate a performance drop root cause in DISTINCT queries and find out how is it possible to increase the speed.
Describe alternatives you've considered
Not doing this
Additional context
Metrics can be found #5276 (comment)
Reproduce the case #5276 (comment)