Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

Database Engine Tuning Wizard recommendation for creating stats Expand / Collapse
Author
Message
Posted Saturday, January 23, 2010 2:57 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, September 16, 2010 1:44 PM
Points: 33, Visits: 92
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 ?

Post #852631
Posted Saturday, January 23, 2010 3:50 PM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Yesterday @ 1:53 PM
Points: 42,771, Visits: 35,870
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 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #852638
Posted Saturday, January 23, 2010 4:13 PM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 3:27 PM
Points: 21,631, Visits: 15,289
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


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #852644
Posted Saturday, January 23, 2010 4:39 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, September 16, 2010 1:44 PM
Points: 33, Visits: 92
Thanks both of you for ur reply I will test them thoughroly in dev env....then only I will move...thnx again





Post #852647
Posted Saturday, January 23, 2010 4:49 PM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 3:27 PM
Points: 21,631, Visits: 15,289
you're welcome



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #852648
Posted Saturday, January 23, 2010 5:35 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, September 16, 2010 1:44 PM
Points: 33, Visits: 92
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 ?
Post #852651
Posted Saturday, January 23, 2010 5:49 PM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 3:27 PM
Points: 21,631, Visits: 15,289
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


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #852652
Posted Sunday, January 24, 2010 12:45 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Yesterday @ 1:53 PM
Points: 42,771, Visits: 35,870
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 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #852694
Posted Wednesday, January 27, 2010 9:22 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, September 16, 2010 1:44 PM
Points: 33, Visits: 92
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

Post #854486
Posted Thursday, January 28, 2010 7:13 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Yesterday @ 6:53 AM
Points: 1,269, Visits: 2,781
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.



Post #855204
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse