Snowflake uses HyperLogLog to estimate the approximate number of distinct values in a data set. HyperLogLog is a state-of-the-art cardinality estimation algorithm, capable of estimating distinct cardinalities of trillions of rows with an average relative error of a few percent.
HyperLogLog can be used in place of COUNT(DISTINCT …) in situations where estimating cardinality is acceptable.
https://docs.snowflake.com/en/sql-reference/functions/hll
Uses HyperLogLog to return an approximation of the distinct cardinality of the input (i.e. HLL(col1, col2, ... ) returns an approximation of COUNT(DISTINCT col1, col2, ... )).
For more information about HyperLogLog, see Estimating the Number of Distinct Values.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
fahfouhi94
Highly Voted 1 year, 8 months agoPrasantSadangi
Most Recent 1 month ago_yyukta
8 months agoMultiCloudIronMan
1 year, 6 months ago