DELETE FROM Table WHERE TableId = 1. 0 row(s) affected. Gives me 2 Reads in Profiler

  • I am deleteing some data fom one of the table, which does not have any value. I have some indexes defined on the table. I do agree SQL sever shows reads in update/delete statement, there are the logical reads / index page reads.

    But what would eb the case where no record is deleted/ updated. In this case also does sql server reads some data?

    Thanks in advance.

    Abhijit - http://abhijitmore.wordpress.com

  • Abhijit More (8/26/2010)


    But what would eb the case where no record is deleted/ updated. In this case also does sql server reads some data?

    Yes, it has to read at least part of the index to discover that there are no matching rows.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Thanks GM for clarification :-).

    Abhijit - http://abhijitmore.wordpress.com

Viewing 3 posts - 1 through 3 (of 3 total)

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