By Thomas Hundley on
6/14/2008 8:39 PM
Here is a script to rebuild all of your indexes on your database. I find that indexes are often ignored once an application moves to production. It's a good idea to evaluate your usage patterns and setup automated maintenance jobs to proactively rebuild indexes before fragmentation has a chance to adversely effect performance. This is especialy important if you are using guids as primary keys and don't move the clustered index to a more logically sequential column.
-- Show fragmentation for all tables
EXECRead More »