There's more...

Statistics are the main input to the optimizer which influence it to create plans or joining strategies. As we saw earlier, it helps the optimizer to make better decisions using actual row counts and data distribution information.

Considerations for collecting statistics:

  • Requires a full table scan
  • Must be kept current
  • May be unnecessary for very large tables

We have techniques with which we can reduce the CPU, I/O, and other resources when collecting statistics:

  • Full stats are the simplest and are the basic ones. Full data demographics are collected regarding the column(s). You need to understand that these sample/summary stats are different from random AMP sample collect stats, in that these stats are actually collected, ...

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.