When assessing the precision of statistics in a table, individuals often depend solely on the collection date. However, this may not always provide enough information. For example, static lookup tables may retain accurate Teradata statistics even if they are not updated. Conversely, some tables experience modifications, with some fields exhibiting broader value ranges while others remain unchanged with a limited number of codes.
To validate your table’s statistics, utilize a WHERE condition to execute a simple query on the desired column. For instance:
SELECT * FROM TABLE WHERE TEST_COLUMN = 'X';
Compare the estimated record count, visible in Teradata Administrator, with the returned record count. If the discrepancy exceeds a single-digit percentage relative to the table’s overall size, then the statistics likely require updating.
Remember that the optimizer’s precision may not always extend to each row. Nonetheless, the disparity between the expected and factual records count ought not be substantial.