It was my belief that in TD14.10, if you collect table-level stats (e.g. via the command "collect stats on TABLE_ABC;") on a table that already has stats collected on numerous columns, Teradata would recollect all of the existing stats IN A SINGLE PASS THROUGH THE TABLE (for this discussion, let's ignore TD14.10's ablility to SKIP stats collection). However, after running an explain on a "collect stats on TABLE_ABC;" statement, I'm no longer sure of that. The explain shows the words "we do an all-AMPs RETRIEVE step from sysdba.TABLE_ABC by way of an all-rows scan" for the first column, but for every subsequent column I see the words "we do an all-AMPs SUM step to aggregate from sysdba.TABLE_ABC by way of an all-rows scan". Does this mean Teradata is performing a FTS for *every* column requiring stats collection?
Here's a log showing my entire test:
The optimizer will attempt to re-use spool files for additional statistics, and may change the order in which stats are collected to improve re-use. But no, it does not guarantee stats can be done with a "single pass" of the table.