The following are the Collect Statistics Syntaxes in Teradata.
“COLLECT STATISTICS ON tablename COLUMN columnname;” will
collect statistics on a column.
.
“COLLECT
STATISTICS ON tablename INDEX (columnname)” will collect statistics on an index.
“COLLECT
STATISTICS ON tablename INDEX (col1, col2, ...)” will collect statistics on multiple columns of an index.
“HELP
STATISTICS tablename;” will display the number of distinct values of the columns.
“COLLECT
STATISTICS tablename;” refreshes (recollects) the table statistics.
“DROP STATISTICS ON tablename ...
;" will drop the statistics.
Very useful commands for beginners. Thank you
ReplyDeletecan i get brief explanation with example.
ReplyDeleteRead the following links
Deletehttp://www.teradata-sql.com/2012/03/collect-statistics.html
http://www.teradata-sql.com/2012/06/list-of-interview-questions-on-collect.html
nice
ReplyDeletenice
ReplyDelete