• it might help...the devil is in the details.

    the pseudo code example we have so far doesn't give us enough to work with...if the big table has an index on the datetime column, the WHERE statement might use an index to find the records, so it would be faster and lock less records (potentially) during the update. but depending on the number of records being updated, the optimizer might just decide it's easier for it to lock the whole table during the update; can't say for sure.

    Baskar B.V (4/9/2010)


    Thanks.

    Eventhough table1 is very large, table2 would have less number of records around 3000 rows so i hope batch update is not required.

    Also i am planning to add "date" condition to where clause from table1 to filter the number of records from table1 eventhough logically ID from table2 does not come below the date condition. Will that where clause help? "date" field has an non-clustered index in the table.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!