Monthly Archives: November 2014

Creating a plan guide

I initially had lots of trouble creating my first plan guide. There are some strict rules to getting them to work, but when they do, it’s magical. Plan guides are unique to a database – you need to make sure … Continue reading

Posted in Plan Guides | Comments Off on Creating a plan guide

Scripting out all indexes

The following script will script out all indexes and can be modified to do just clustered or non-clustered by adjusting the upper CTE query WHERE clause (highlighted with comments). You can add the DROP_EXISTING=ON if you want to move an … Continue reading

Posted in T-SQL | Comments Off on Scripting out all indexes