Quantcast
Channel: Teradata Developer Exchange - Blog activity for carrie's blog
Viewing all articles
Browse latest Browse all 1058

New opportunities for statistics collection in Teradata 14.0 - comment by jman0670

$
0
0

Carrie,

When collecting stats in the following format, it was my understanding that the table is read once; similar to what I have been told about just collecting at the table level.
COLLECT STATS
COLUMN(COL_A),
COLUMN(COL_B),
COLUMN(COL_C),
COLUMN(PARTITION)
ON <databasename>.<tablename>;
However, when reading the explain, it appears that it doing steps similar to the following for each individual column: 
We do a SUM step to aggregate from <database>.table by way of an all-rows scan.
Aggregate Intermediate Results are computed globally, then placed in Spool 35472.
We Then we save the UPDATED STATISTICS from Spool 35472(Last Use) into Spool 35474, which is built locally on a single AMP derived
from the hash of the table id
Questions:
1.  Is my understanding incorrect? 
2.  Will Teradata only do one pass when collecting at the table level only?
Thanks,
Mark
 
 
 
 


Viewing all articles
Browse latest Browse all 1058

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>