How can I delete statistics on a specific table.
Posted on 2007-07-31
We have a web based application. This application has a table which tracks the person records that the currently logged on user has access to. Every 10 minutes a scrub action is performed on this table to clear the inactive sessions. This table has insert, update and delete actions being constantly performed on it.
The majority of our installs run on Oracle. In Oracle, it was determined that performance drastically improves when we delete the statistics on this table so that the Cost Based Optimizer does not attempt to use the out-dated statistics to choose the execution plan. Basically, statistics become outdated after such a short period of time that it is detrimental to performance.
SQL server seems to handle statistics drastically different from what I have seen. I'm not sure if I understand this 100% quite yet, but I believe that statistics are performed on a per index basis.
How do I delete stats on all indexes for a specific table?
Is there any reason that having stats on this particular table would have a positive effect on performance given the scenario above?
If one of our smaller SQL server installs were to use the Auto Update Statistics option, is there a way we can prevent stats from executing on this table?