January 23, 2010 at 2:57 pm
I am testing my quesries and stored procedures using Database Engine Tuning Wizard....It is giving me good suggestions but it also telling me to create stats....as per my knowledge stats creates automatically by sql server....I am working on development environmnet...can I create scripts of stats and run into production env..please advice ?
January 23, 2010 at 3:50 pm
DTA will usually recommend multi-column stats. SQL will automatically create single column stats only.
That said, test out all of its recommendations (including the indexes) before making the changes in production. If there are any that don't give a perf improvement, don't create them.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 23, 2010 at 4:13 pm
You can use those scripts in production - but only do so after you have tested, tested, and tested some more.
Some of the recommendations from DTA are good. Not all DTA recommendations should be implemented.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
January 23, 2010 at 4:39 pm
Thanks both of you for ur reply I will test them thoughroly in dev env....then only I will move...thnx again
January 23, 2010 at 4:49 pm
you're welcome
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
January 23, 2010 at 5:35 pm
If I will add stats in database is there any disadvantage of that....like if we add indexes...it takes space....it slowing the insertion..... etc
what are advantage of it ?
January 23, 2010 at 5:49 pm
Good statistics will help improve query performance.
The downside is that you will need to perform maintenance on those indexes - which you should be doing anyway. If you don't perform the maintenance, then bad statistics could cause a decrease in query performance.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
January 24, 2010 at 12:45 am
Ather M (1/23/2010)
If I will add stats in database is there any disadvantage of that....like if we add indexes...it takes space....it slowing the insertion..... etc
No, nothing really. Statblobs are very small compared to an index, no degradation of inserts/updates/deletes
what are advantage of it ?
They give the query optimiser information on the distribution of rows in the table.
Personally, I never create stats manually, leave it up to SQL to create the ones it needs and let me focus on adding indexes if necessary.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 27, 2010 at 9:22 am
Thanks for your reply....
I am not very happy to use DTA...
Can you ppl suggest me some other tools or third party tool to check the performance
January 28, 2010 at 7:13 am
I too never create stats stuff manually.
The other 'tool' to use for creating indexes is just to put the query into the explain tool, see what indexes it does or does not use and manually try different indexes to see if it changes the access plan... in a nonprod environment of course.
January 28, 2010 at 11:10 am
I would suggest getting to know how to read execution plans. Knowing how to read your execution plan can help you to understand index usage and indexes that may or may not be needed to improve your costly queries.
There are also scripts in the ssc scripts section for rating your indexes. You might want to look some of those up and test-drive a few of them.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
June 29, 2013 at 12:19 am
Are these statblobs created with CREATE STATISTICS recommendations from the DTA auto updated like index statistics?
June 29, 2013 at 7:03 am
Yes
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 13 posts - 1 through 12 (of 12 total)
You must be logged in to reply to this topic. Login to reply