Hi,
I’m having trouble with count distinct reflections
My SQL is simple:
“SELECT count(distinct id) FROM Common.xx where event_time = ‘2022-5-20’”
But this query only accelerated by raw reflection, not the aggregation reflection.
As far as I know, there are two ways to solve this:
- use select ndv(id) instead. But ndv is an approximation of count.
- create a VDS using select count(distinct xx) and create raw reflection on it. But this may result in plenty of redundant VDSs
So, is there any other better solutions for count distinct?
Thank you