August 1, 2008 at 2:31 pm
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
August 1, 2008 at 3:17 pm
So the query optimizer appears to be working Now what is your question? All I read is a statement...
August 1, 2008 at 3:29 pm
The clustered index contains the data pages. If you update the data pages, you are updating the clustered index.
August 2, 2008 at 3:46 am
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
August 5, 2008 at 8:52 am
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