Statistics DDL

  • Hi Team,

    i've a table with statistics, how to view the DDL for the current statistics in Sql server 2008.

    Please...

  • Could you be a little more specific as to what you're looking for?

    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
  • am having a table 'Stud' with index 'ix_std_to' and statistics 'ix_std_to', now i want to delete the existing statistics and check the performance of my query, and also i want to create the same statistics again, for that i want current statistics backup or DDL file to re-create.

    Please suggest....

  • The statistics are associated with the index (they have the same name). The only way you can drop those is to drop the index, to recreate the stats, you would recreate the index, so it's the CREATE INDEX statement you need and that can be scripted from SSMS.

    Additional stats very, very seldom degrade performance unless they're being updated frequently.

    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 4 posts - 1 through 3 (of 3 total)

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