SQL Server creates statistics when it can not find an adequate index to perform a particular query. It makes this determination based on an algorithm that takes into account frequently used queries. This prevents the engine from creating statistics every time it doesn't find an index, but still allows it to self-optimize when it determines a need. Remember, the presence of statistics that SQL Server builds is an indication of inadequate indexing. Instead of trying to copy stats around, you should be asking yourself why does SQL Server even have to create those stats in the first place? It is creating those stats because you have not created sufficient indexes for the query patterns your users are placing against the server? Stats are not transferred and are transitory things. Your performance problems are solved by creating the indexes you need, instead of relying on SQL Server to finally determine that you need them, and then creating stats to fill the void your lack of indexes have left.
For More Information
- What do you think about this answer? E-mail us at editor@searchDatabase.com with your feedback.
- The Best Microsoft SQL Server Web Links: tips, tutorials, scripts, and more.
- The Best SQL Web Links
- Have a SQL Server tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize. Submit your tip today!
- Ask your technical SQL Server questions -- or help out your peers by answering them -- in our live discussion forums.
- Ask the Experts yourself: Our SQL, database design, Oracle, SQL Server, DB2, metadata, object-oriented and data warehousing gurus are waiting to answer your toughest questions.
Dig Deeper on Microsoft SQL Server Installation
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.