Database Engine Tuning Wizard recommendation for creating stats

  • 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 ?

  • 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

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • 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

  • Thanks both of you for ur reply I will test them thoughroly in dev env....then only I will move...thnx again

  • 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

  • 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 ?

  • 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

  • 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

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • 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

  • 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.

  • 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

  • Are these statblobs created with CREATE STATISTICS recommendations from the DTA auto updated like index statistics?

  • 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

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

Viewing 13 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic. Login to reply