Identifying stats for a table

You can now collect stats on the following objects:

  • Columns
  • Expression or statement
  • Table summary level

With these options in hand, we need to identify when we need to collect stats, on which column, and what type of stats need to be collected.

Statistics are collected on either a table or columns in a table. The following information is collected when we execute the collect statistic command:

  • Number of rows in the table
  • Average row size
  •  Information on all indexes in which statistics were collected
  • The range of values for the column(s) in which statistics were collected
  • The number of rows per value for the column(s) in which statistics were collected
  •  The number of NULLs for the column(s) in which statistics ...

Get Teradata Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.