|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 11/5/2009 6:07:39 AM
Posts: 9,
Visits: 10
|
|
|
Hi. What is the need of collect statistics in teradata? Can anyone explain with suitable examples? Also, How can we choose the collect statistics columns?
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: 10/5/2009 12:34:37 PM
Posts: 10,
Visits: 26
|
|
Collect stats is an important concept in teradata, collect stats gives PE to come up with a plan with least cost for an requested query. Collect stats defines the confidence level of PE in estimating "how many rows it is goin to access ? how many unique values does a table have , null values etc and all this info is stored in data dictionary. Once you submit a query in TD the parsing engine checks if the stats are aviable for the requested table , if it has collected stats earlier PE generates a plan with "high confidence" . in absence of collect stats plan will ne with "low confidence" . however teradata's optimizer is very robust and intelligent, even if you do not collect stats on a table,coulmn,indexes PE does an "Dynamic Amp sampling " which means it will select a random amp and this random amp comes up with the info about the table data it has , based upon this PE ( knows datademographics & available system componets) estimates the workload and generates a plan.
hope this info helps.
Cheers,
Samp
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 11/5/2009 6:07:39 AM
Posts: 9,
Visits: 10
|
|
|
Thanks Samp for your explanation. Thanks a lot !!!
|
|
|
|