Collect Statistics on Null | Teradata Vantage - Collecting Statistics on Null - Analytics Database - Teradata Vantage

Database Administration

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-11-03
dita:mapPath
pgf1628096104492.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
ujp1472240543947
lifecycle
latest
Product Category
Teradata Vantageā„¢

When you collect statistics, Vantage records three different null counts: NumNulls, PNullUniqueValueCount, and AllNulls.

  • NumNulls is the number of rows that have a null in at least one field. This includes rows with all fields null.
  • PNullUniqueValueCount is the number of unique values in rows with partial nulls.
  • All-Nulls is the number of rows that have all fields null. For example, in the following table, NumNulls count is 4, All-Nulls count is 2, and PNullUniqueValueCount is 2:
    x        y
    ------  -------
    1        a
    ?        b
    ?        ?
    4        ?
    ?        ?

Use the SHOW STATISTICS statement to report the number of nulls after collecting statistics. By considering NumNulls, All-Nulls, and PNullUniqueValueCount counts, Teradata can better estimate the number of unique values in the presence of nulls.