|
Archives of the TeradataForumMessage Posted: Mon, 15 Dec 2003 @ 16:41:13 GMT
We just had an NCR consultant in last week to look at our system performance. One of the things we discussed was table statistics. He told me that we did not need to collect statistics on table columns that did not have values that were less than 5% of the total of values. So if you only had two distinct values in a column, you would not need to collect statistics on that column because the parser would ignore them anyway. But if you had 20 evenly distributed values for that column, collecting statistics would help. I opened an incident with NCR for a query that was running out of spool. They told me that the problem was caused from no statistics being collected on one of the columns in the where clause of the query. The column has 2 values, one occurs 1,374,164 times, the other 562,945 times. I have heard other people say that statistics should be collected on all columns and indexes in a table. Does anyone have any feedback on this question? Also, here is the query that is failing in case anyone is interested. The statistics they tell me to collect are on the generic_preferred column of the dss_tables.preferred_sales_roll1 table. SELECT country_code,
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||