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

Why collect PARTITION statistics on Non-Partitioned tables? - comment by carrie

$
0
0

Collecting statistics on PARTITION only applies in Teradata releases BEFORE 14.0.  After 14.0 you do not want to collect on PARTITION for all tables, only for partitioned tables.   In releases 14.0 and above, collect SUMMARY statistics on all non-partitioned tables, not PARTITION statistics.
 
Concerning your first question  "Do collecting [partition] only stats on a daily basis for all tables will cause extrapolation process to never work ?"
 
The answer is no.  Collecting stats on PARTITION will help extrapolation be more accurate for all statistics on the table.  The first paragraph of the blog posting above makes that point:  "Extrapolations based on table growth will be be more accurate if statistics are being regularly collected on the system-derived column PARTITON, whether or not a table is partitioned."
 
You only need to collect on PARTITION for tables that DO HAVE statistics, not on tables that DO NOT HAVE statistics.   If a table does not have statistics, there will be no statistics to do the extrapolation process on.  The purpose of extrapolation is when you don't have time to fully recollect statistics, then the optimizer will assess the growth of the table since the last statistics collection and project what some of the values in the statistics histogram will be.   If there is no histogram, there will be no extrapolation.
 
Having PARTITION stats that are very current will help the extrapolation of statistics on that same table be more accurate.
 
Thanks, -Carrie


Viewing all articles
Browse latest Browse all 1058

Trending Articles



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