I have been looking at poorly performing stored procedure that performs well for larger customer databases. I believe the reason is that SQL Server has not had time to properly create good statistics on the queries.
I used the database tuning advisor to recommend several statistics, and after applying those in test environment with a restored backup of the database in question, performance was significantly better.
My question is this. If I create a script (Maintenance Script as we call them in house) for support to run on customers who may also be experiencing this issue. Would it be a potential bottle neck on performance if a statistic had already been created automatically for the same column(s) by SQL Sever and my script creates a duplicate statistic?
Auto create and update statistics are set to ON in case you are wondering. We support customers who run SQL 2005 (unfortunately) or higher.
auto update stats
is turned on, they may not be getting updated often enough. A generalized rule-of-thumb for SQL Server 2005 would be that stats get auto-updated when at least 20% of rows have been updated or inserted. You may want to look at Ola Hallengren's scripts for running nightly or weekly maintenance for this purpose.