|
Good Morning all, I am actually trying to learn as to how and when to use the statistics in SQL SERVER 2008.
Once i do this part of the command, i am not sure where to look for the created statistics. Is there any special table in the sys.tables associated with the Statistics. And as far as I have done my research, i have seen having statistics created on a specific table or an index, Wondering if there is an option to do them, on a specific schema in the database and a specific database as a whole. Then the next part of the statement would be to update this statistics, I have seen sample update statistics statements, but i am not sure how would i update my previously created statistics, presented in the above CREATE STATISTICS statement. Thank you all once again.
(comments are locked)
|
|
The best practice is to set the database to auto create and auto update statistics. Unless you've hit a performance issue that is pretty extreme, this is the best way to manage statistics. To see what statistics you have, use DBCC SHOW_STATISTICS. You can specify the object within a database that you want to look at. You really should not try to manually manage statistics. The system does the vast majority of the work for you. You can, and should, schedule a manual update of the stats using sp_updatestats. That will update all the statistics, using sampling, within a given database. In some, rare, instances you may need to do targeted statistics updates with a full scan. You can do this with the UPDATE STATISTICS command. Thank you Grant, another aditional question to clarify my reason for asking this question.. so for a DB which would encounter about a quater a million transactions every day, should statistics be a concern, even when set to auto create and auto update?
Apr 28 '10 at 11:58 AM
Katie 1
Yes, but probably only in certain tables or certain indexes. For the most part the automatically created & maintained statistics will work fine.
Apr 28 '10 at 01:54 PM
Grant Fritchey ♦♦
(comments are locked)
|

