Update Statistics high vs medium/low
Posted in 2000
Topics: Performance & Tuning
Hello gurus, Is it by any chance possible that executing update statistics high will slow down the queries and executing update statistics medium/low will improve the performance. Any kind of help is appreciated. Thanks in advance. Tony Woods. ________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
i'm told its an art form to figure that out... but in the interest of science you could calculate the time involved for your comparisons... one thing is that if you set explain on and if you see it's not using the index you want it to use, you could try directives to the engine, such as avoiding sequential scans, or you might try the optimizing low to see if it picks up the index ... try running update statistics medium for table distributions only then run high for first column in each index run low for all columns in each multi column index ( not the first row tho) high for columns which do not head indexex, but are used in equality or inequality expressions. dont forget update statistics for procedure for each procedure. Tony Woods wrote: > Hello gurus, > > Is it by any chance possible that executing update statistics high will slow > down the queries and executing update statistics medium/low will improve the > performance. > > Any kind of help is appreciated. > > Thanks in advance. > Tony Woods. > ________________________________________________________________________ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
Tony Woods wrote: > > Hello gurus, > > Is it by any chance possible that executing update statistics high will slow > down the queries and executing update statistics medium/low will improve the > performance. It CAN happen, especially depending on how one is evaluating faster -vs- slower. It can certainly change the query path and the path under HIGH may involve sorting and unexpected indexes that can cause the return of the first rows more slowly than another query path might. If you want the engine to favor the return speed of the first rows rather than the return speed of the entire select set you can SET OPTIMIZATION FIRST_ROWS. Even beyond that, it is possible under specific circumstances for the optimizer to make a 'better' decision using MEDIUM stats than HIGH. However, this is rare and should be investigated further as setting the optimizer goal as above, using directives, or changing OPTCOMPIND may be a more consistent solution. Changing stats to MEDIUM from HIGH may improve some queries but hurt others. Art S. Kagel