select APPROXIMATE_COUNT_DISTINCT(col1) from big_table;it's fine and I get results much faster than by calling
select count(distinct col1) from big_table;But when I use group by statement like:
select col2, APPROXIMATE_COUNT_DISTINCT(col1) from big_table group by col2;I get results much slower (eg 10 times) than by using
select col2, count(distinct col1) from big_table group by col2;Then only solution is to use error_tolerance = 5 or greater. Then I get results very fast. Cardinality of col2 is low (20 records in my test case).
It's frustrating. Is this a feature or bug?