WHAT IS INDEX FRAGMENTATION IN MS SQL SERVER

Amit Singh

Total Post:565

Points:2825
Posted by  Amit Singh
 1554  View(s)
Ratings:
Rate this:
  1. Amit Singh

    Post:565

    Points:2825
    what is index fragmentation in MS Sql Server

    Index fragmentation is a phenomena where index contents are no longer stored continuously in the storage. When index contents become scattered in the storage, fragmented, performance on index will degrade.

    If you want to see the fragmentation level of an index, you can use the system function called sys.dm_db_index_physical_stats() in the following format:

    SELECT * FROM sys.dm_db_index_physical_stats(
    database_id, table_id, index_id, DEFAULT, DEFAULT )

  1. Anurag Sharma

    Post:19

    Points:95
    what is index fragmentation in MS Sql Server

    When we  perform any data modification operations (INSERT, UPDATE, or DELETE statements) table fragmentation can occur. When changes are made to the data that affect the index, index fragmentation can occur and the information in the index can get scattered in the database. Fragmented data can cause SQL Server to perform unnecessary data reads, so a queries performance against a heavy fragmented table can be very poor. If you want to determine the level of fragmentation, you can use the DBCC SHOWCONTIG statement. The DBCC SHOWCONTIG statement displays fragmentation information for the data and indexes of the specified table or view.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!