Wednesday 2 November 2011

Analyze Parameter - Oracle

Degree: When taking statistics you can perform parallel queries using the  degree parameter,this way your procedure will perform faster,the basic rule is to set the degree parameter equal to the number of CPUs (or cores) minus 1.

Estimate_percent: It is not easy to select the best size for the estimate_percent  parameter.If you set it too high.It will take a long time to collect the statistics.If you set it too low,you can gather the statistics quickly all right.but those statistics can very well be inaccurate.We can set value between 0 to 100.A rule of thumb here is that the more uniform the table's data,the smaller the sample size.On the other hand,if a tables data is highly skewed,you should use higher sample size.Of course,setting the parameter to value 100 means that the database is not doing an estimation.If you think the data is uniformaly distributed even a 1% - 2% sample size wil get you very accurate statistics and save you a bunch of time.By default the database uses the constant DBMS_STATS.AUTO_SAMPLE_SIZE TO DETERMINE THE BEST SAMPLE SIZE.

No comments:

Post a Comment