Determine Index Fragmentation in a SQL Server Database
Index fragmentation can adversely affect query response time. When accessing data through an index, SQL Server must read each page in the specified range to retrieve the indexed values. If the index is...
View ArticleRebuild indexes based on fragmentation – sp_RebuildIndex
In my previous post here, I’ve discussed how we can detect fragmentation in SQL Server databases indexes using dynamic management view function sys.dm_db_index_physical_stats. In this post, I’m sharing...
View ArticleSQL Server index related dynamic management views and functions (Part 2)
SQL Server uses indexes to sort and organize table data. It creates indexes based on ordering values from one or more selected columns. SQL Server automatically creates indexes when you define a...
View ArticleRebuild all indexes on all tables in the SQL Server database
One of the key tasks of a DBA is to maintain the database indexes and make sure they are not fragmented. You can use a sys.dm_db_index_physical_stats in a script to rebuild or reorganize indexes based...
View Article