How to do it...

  1. Identify the query on which expression stats need to be collected.
  2. Use the following format to collect statistics:
COLLECT [SUMMARY] STATISTICS[USING options]COLUMN expr [[AS] statistics_name][,COLUMN (expr […, expr]) [[AS] statistics_name]]ON [TEMPORARY] <Table>;

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.