Let’s say we have a table that has 2 million rows. It has two nonclustered indices on it. Generally speaking, would it be faster to drop it, recreate it with new data and re-apply the indices than to delete from it all its rows and then do an insert of new data?
Note: I am trying to avoid using trunc as it requires sysadmin priv.
Try
TRUNCATE TABLE TableNamethe TRUNCATE statement is very fast, and a better approach than dropping the table, or usingDELETE FROMPermissions: From the MSDN about
TRUNCATE:So you do not need
sysadmincredentials to accomplish this.