SQL Server Performance

clustered index update in query execution plan

Discussion in 'SQL Server 2005 T-SQL Performance Tuning' started by sekharabcs, Oct 20, 2009.

  1. sekharabcs New Member

    Hi All,
    I am able to see that Clustered Index Update is taking huge % in query exec plan. Its taking around 81% in the whole query cost.Update tab t Set Status = 20 From tab t Where T.Status <> 20 And Exists(Select OL.OI From OL Where T.Id = OL.OI) And Not Exists (Select OL.OI From OL Where OL.OI = T.Id And OL.LS <> 52 And OL.IT <> 0)
    In query exec plan, it is displayed as Clustered Index Update on Primary Key. PK is on ID column of table tab.
    Do I need to do something to tune this query or is it okay to have clustered index update on a table?
    Regards,
    Sekhar
  2. FrankKalis Moderator

    The clustered index actually is the table, because the table's data pages are at the leaf level of the clustered index. So, any update to a table with a clustered index must result in a clustered index update. If this however is done in a reasonable time or not depends on a couple of other factors, such as locks & blocks, row size, free space, etc...

Share This Page