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

Statistics collection recommendations – Teradata 14.0 - comment by carrie

$
0
0

Saurabh,
 
Once you are on 14.0 you can query the StatsTbl in the data dictionary.  The IndexID field in that table will = 1 for the primary index fields(s).    There is a view on top of the StatsTbl (and a couple of other DBC tables) called StatsV that carries DatabaseName, TableName and also IndexID.  If you pass values for those fields in a query you can determine is a specific table has stats collected for the primary index.
 
In 14.0 there  is also a view called TableStatsv.  In this case use the indexnumber = 1 to see if the primary index has stats collected.
 
sel  indexnumber, tablename, databasename
from dbc.tablestatsv
where databasename='db_name'
and tablename = 'tbl_name'
and indexnumber = 1;
 
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>