It’s not all that uncommon to start a new job, or inherit a project, and find out that index maintenance hasn’t exactly been a priority. One of the first things you want to do is look at fragmentation. This query will pull back all the indexes for My_Database ordered by the average fragmentation in percent. […]