• ZZartin (3/24/2015)


    Based on what you have posted, these indexes are not helping you in any way. Indexes speed up reads and slow down modifications. In other words an index, when used, will speed up a SELECT query but slow down an INSERT, UPDATE or DELETE query. Since, according to the query you are running (and I have not looked at the article from where you got the query) these indexes are not being seeked or scanned - they are not speeding anything up and only slowing things down.

    Just kind of nit picking on this and it's not really important to whether an index is used but indexes aren't only used to speed up SELECT statements, how else does SQL Server find the rows it needs to UPDATE/DELETE?

    bwahahahaha! Unfortunately our comments crossed paths and you missed my follow-up comment/examples.

    how else does SQL Server find the rows it needs to UPDATE/DELETE?

    It depends on the query. Unless, perhaps, your Update is based on a JOIN more indexes will slow down you UPDATE statements, not speed them up.

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001