|
|
Archives of the TeradataForum
Message Posted: Fri, 18 Jun 2004 @ 14:04:31 GMT
Subj: | | Re: Can we check stats automatically |
|
From: | | Geoffrey Rommel |
| Is there a way to check stats on tables automatically. Something happened and the stats on one of our tables went to all zeros (still do
not know why!) | |
This happened to me once. I had a batch process that collected stats automatically, and it happened to run just when a load job had
cleaned out the table in preparation for reloading all rows. Oops.
Anyhow, to fix this problem, write a program (Perl or C) that issues "help stats" on each table, interrogates the results, and re-collects if
they contain zeros. Theoretically it is possible to inspect the stats as they are stored in DBC, but the exact layout of FieldStatistics is
undocumented and could change in any new release.
| |