Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Marked for deletion vs actual delete

Author  Topic 

tarr11
Starting Member

2 Posts

Posted - 2002-10-03 : 22:49:59
Can someone pls discuss the pros and cons of marking a row for deletion vs actual deletions? I have a highly transacational set of tables that are rarely deleted from by users, but administrators tend to do quite a bit of deleting, which locks up many of our tables. I have heard that marking for deletion is much faster as it only involves an update whereas a deletion involves going through all the indexes and reorganizing everything.

Thx,
Doug

nr
SQLTeam MVY

12543 Posts

Posted - 2002-10-04 : 04:27:04
If you update a non-indexed field and don't change it's size then it will be faster. You will then have to change all the code to take account of the delete flag which will slow it down.

>>administrators tend to do quite a bit of deleting, which locks up many of our tables.

Tell them to learn how to do their job - that's a no-no.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -