Truncate and Replace

Trying to delete more than 10% of the rows in a huge table? Rather than deleting the rows you don't want, it might be faster to:

The technique also works if you are trying to update more than 10% of the rows in a table.

Deletes and Updates are very slow compared to Direct Load Inserts. The actual break-even point beyond which the techniques above will out-perform Delete and Update will probably be somewhere around 10% to 50% of the table/partition, but will depend greatly on the indexes on the table which must be rebuilt after a Direct Load Insert.


©Copyright 2003