|
Archives of the TeradataForumMessage Posted: Mon, 25 Sep 2006 @ 21:05:07 GMT
If there are only a few tables Use the Help statistics , and copy the columns into excel or other text editor. E.g. HELP STATISTICS DATABASENAME.TABLENAME; (Manual Labor); BUT THAT DOES NOT DISCERN the difference between column stats and index stats I believe (Corrections anyone?) Or .... Better to Use the dbc.indexstats & dbc.columnstats views. IF you have NAMED indices you can use the following to generate SQL. select distinct 'collect statistics on '||trim(databasename)||'.'||trim(tablename) ||' index '|| IndexName || ';' from dbc.indexstats where databasename = 'Databasename' and tablename = 'Tablename'; If you didn't name your indices like nusi1 or upk1 or whatever, you will not be able to collect the stats. I don't have time to figure out the how to use dbc.columnstats right now. With that strange Varbyte(16383) from the TVFields table and all... Any masters or Experts out there have the SQL generation code for that?? It would be much appreciated.
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||