Clustered Index update

  • I am updating columns in the table which are not part of primary key or the indexes defined on the table but it is using clustered index while updatating .

    Follwing is the query

    Declare @T varchar(32)

    Declare @de smallint

    UPDATE T

    SET ED = DATEADD(mi, @de, GETUTCDATE()),

    DE = @de

    WHERE T = @T

    There is Non CI on T column of the Where clause but there is still CI used as seen in the execution plan.

    It uses Clustered Index Update operator

  • So the query optimizer appears to be working Now what is your question? All I read is a statement...

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • The clustered index contains the data pages. If you update the data pages, you are updating the clustered index.

  • The thing to remember is, to all intents and purposes, the clustered index, is the table.

    "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

  • Thank you everybody for the explainations.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply