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 2005 Forums
 Other SQL Server Topics (2005)
 Speedy deletes

Author  Topic 

aausch
Starting Member

1 Post

Posted - 2007-03-22 : 14:14:32
I'm wondering if anyone has compared the speed of different kinds of deletes.

Assuming super large tables, I wonder, what is the speed ordering for the following operations:
* Remove a column
* Remove a row
* Remove a table

I'll experiment to see if I can get numbers comparing the speeds, but, if someone's already done the work, I'd love to know

thanks

nr
SQLTeam MVY

12543 Posts

Posted - 2007-03-22 : 14:43:16
Removing a column would have to update every data row - would expect this to be slow.
Removing a row just updates one page - but may have to read the whole table if the delete isn't on an indexed column.
Dropping a table will update the system tables (and deallocate all the extents) - could be faster or slower than deleting the row.



==========================================
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

snSQL
Master Smack Fu Yak Hacker

1837 Posts

Posted - 2007-03-22 : 17:04:03
Why do you want to compare those operations, just because they all remove stuff doesn't mean that they are related in any way? That's like analyzing how long it takes to erase a whiteboard, pull a splinter out of my finger and demolish a house, they all remove stuff but have nothing to do with each other.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-03-23 : 06:56:37
"analyzing how long it takes to erase a whiteboard, pull a splinter out of my finger and demolish a house"

LOL!
Go to Top of Page
   

- Advertisement -