Kendal Van Dyke

Wednesday, September 08, 2010 4 comments A + A -
Performance SQL Server 2005 SQL Server 2008 Tips Troubleshooting

Share This

  • Twitter
  • Google+
  • Linked In
  • Facebook

Related Posts

Performance SQL Server 2005 SQL Server 2008 Tips Troubleshooting
Newer Post Older Post Home

4 comments

John Sansom said...

Now this is very interesting and not something I had previously considered I must admit.

Out of interest, is this something that you perform quite often as part of say your regular performance tuning effort, such as looking for un-used indexes and the like?

September 9, 2010 at 12:28 PM
Vitali.lisau said...

I found a couple of issues with the script.

1) The code returns duplicate DROP statements sometimes. This happens when the statistics is duplicated more than once. (this is not a big deal).

2) The other rare issue deals with dropping some autogenerated statistics, and SQL Server will autogenete it again thereafter.

This occurs when the order of the columns in the underlying index is not the same as the order of the columns in the related index statistics.

I encountered the problem in SQL Server 2005 EE SP3 (e.g table dbo.ExecutionCache in "ReportServerTempDB" SSRS database, index "IX_ExecutionCache").

September 13, 2010 at 12:37 AM
jag said...

Thanks for the useful script, one question...

why do you only check sys.stats_columns.stats_column_id = 1?

Jag

September 13, 2010 at 10:19 AM
Andy Warren said...

Good script. I'm going to update my stats presentation to reference it. Let me know if you make any changes/improvements!

September 14, 2010 at 9:15 AM

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Things You Need To Know If You Use DFS Replication
  • Disk Performance Hands On, Part 5: RAID 10 vs. RAID 5
  • SQL Server Management Studio 2008 Installation Walkthrough
  • Disk Performance Hands On, Part 2: RAID 10 Performance
  • Disk Performance Hands On, Part 6: RAID 10 vs. RAID 1

Labels

About Me Best Practices Career Data Mining Documentation Feature Requests Humor MagicPASS Meme Monday Mirroring Parameter Sniffing PASS Performance PowerShell Presentations Query Tuning Recognition Replication Scripts Security SQL Power Doc SQL Server 2005 SQL Server 2008 SQLH2 SQLRally SQLSaturday SYDI T-SQL Tuesday Tips Troubleshooting Updates VirtualBox Windows XML

What I'm Saying On Twitter

Tweets by @SQLDBA
Copyright © 2015 Kendal Van Dyke. All rights reserved.

Kendal is a database strategist, community advocate, public speaker, and blogger. A practiced IT professional with over 15 years of SQL Server experience, Kendal excels at disaster recovery, high availability planning/implementation, & debugging/troubleshooting mission critical SQL Server environments. Kendal is a Senior Consultant on the Microsoft Premier Developer Support team and President of MagicPASS, the Orlando, FL based chapter of PASS. Before joining Microsoft, Kendal was a SQL Server/Data Platform MVP from 2011-2016. [About Kendal] (http://lh3.googleusercontent.com/-wrW1fk8IiFE/Vr36w9dtRxI/AAAAAAAADCw/tVa4vTgLWIw/w139-h140-p/IMG_3503.JPG)