COLLECT STATISTICS is remarkable.
Here is how it works. Lets say you have an employee table with 1,000,000 employees. You decide to collect statistics on the column Last_name.
The AMPs will now either do a full table scan or a percentage COLLECT STATISTICS based on which option you choose.
The system will sort the last_name values in the employee table and place the names in 100 intervals. Because the last_name values are sorted and statistics are gathered about all 100 intervals the Parsing Engine can estimate the rows it will need to have the AMPs retrieve.
COLLECT STATISTICS sorts the values and places them in 100 different intervals. The PE can interrogate the intervals to Estimate ranges of values as well as frequent values.
Main Topics
Browse All Topics





by: vinurajrPosted on 2009-03-25 at 06:52:56ID: 23979389
SQl: ewthread.c fm?qid=115 9016&page= 5
om/eDownlo ad.cfm?ite mid=052910 003& redire ctfromfle= y om/teradat aForum/Top ic9470-5- 1 .aspx#bm94 72 assets/0/2 06/280/56f 08863-c9fd - 410d-ae9f -47b24b37e 566.pdf
collect statistics on table_1 index (field_1, field_2)
http://www.tek-tips.com/vi
http://www.info.teradata.c
http://www.teradata-emea.c
http://www.teradata.com/t/