We are using MS SQL Server 2005.
Hi, i am performing UPDATE statement on a database table. Lets say this table has next colums:
int Id PK
int Column1
int Column2
It also has several Index:
Unique Clustered (Id)
Non-Unique Non-Clustered (Column1)
Non-Unique Non-Clustered (Column2)
I do next operation:
UPDATE [dbo].[Table]
SET Column1 = @Value1
WHERE Column1 = @Param1
AND Column2 = @Param2
Actual execution plan after that looks like this:
Which says that 86% of time was spent on updating clustered index, which does not include column i have just changed.
This operation should run hundreds of thousands times with web application disabled, which means it is very time critical.
So, does anybody have any idea why things are going this way and if it can be fixed somehow? Does this question make any sense? I am ready to provide more information if needed.