SQL Language (MOSC)

MOSC Banner

Truncate vs delete

edited Oct 3, 2013 1:55AM in SQL Language (MOSC) 9 commentsAnswered ✓
Hi,

Oracle has given us the following example to remove all rows from some Documaker tables. When there is a large amount of rows, this generates a considerable amount of logging which consumes disk space. Since this is a test environment and we want to clear the tables, we don't expect to roll back. Any reason the "DELETE FROM TRNS" could not be changed to "TRUNCATE TABLE TRNS"? The triggers and foreign key constraint are being disable, so that should not cause a problem. Also, by using the TRUNCATE, the shrink would not be necessary. Any input appreciated. Thanks.

ALTER TRIGGER TRNSHIST_INS_TRG DISABLE;

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center