Approximate Cardinality Function | Teradata Vantage - Approximate Cardinality (ML Engine) - Teradata Vantage

Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
9.02
9.01
2.0
1.3
Published
February 2022
Language
English (United States)
Last Update
2022-02-10
dita:mapPath
rnn1580259159235.ditamap
dita:ditavalPath
ybt1582220416951.ditaval
dita:id
B700-4003
lifecycle
previous
Product Category
Teradata Vantageā„¢

The Approximate Cardinality function, which is composed of the ApproxCardinalityReduce and ApproxCardinalityMap functions, can estimate the cardinality (number of distinct values) in a column or combination of columns, scanning the table only once.

Teradata recommends this function when the column or combination of columns has a large cardinality. When the cardinality is small, Teradata recommends the SQL SELECT DISTINCT command.

The function uses the Flajolet-Martin algorithm. For more information, see Probabilistic Counting Algorithms for Data Base Applications, by Philippe Flajolet and G. Nigel Martin (http://portal.acm.org/citation.cfm?id=5215).