Home Forums SQL Server 2012 SQL Server 2012 - T-SQL Why the Indexes on table slow down the DML operation on table, what is the exact reason? RE: Why the Indexes on table slow down the DML operation on table, what is the exact reason?

  • When you add a row to a table that has an index, the index has to be updated to reflect the new value added. When you modify a value that is in an index, the index has to be modified. When you delete a row, the index has to be updated. It's just extra work. That said, as was already mentioned, when you have to delete or update a row, you also have to search for that row. Having an index can make that search much faster (much, much faster), so the costs associated with maintaining the index are offset by the cost savings of using that index. That's before we even get to the concept of dealing with page splits as data gets inserted or updated in indexes causing the pages to rearrange, an added overhead. In short, it's a balancing act. Picking the right set of indexes, but not too many, for a table is work. Otherwise, you could just put an index on every column, just in case (and I've seen that done, it's a horrible idea that leads to all sorts of problems).

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning