Login  Register

Re: truncate table with large number of data

Posted by ErmanArslansOracleBlog on Sep 06, 2017; 7:13pm
URL: http://erman-arslan-s-oracle-forum.124.s1.nabble.com/truncate-table-with-large-number-of-data-tp3402p3410.html

There are 3 ways that come to my mind;

1)create a table using where clause.. Do an unrecoverable operation for faster execution. Drop the old table, rename the new table.

create table newtable unrecoverable as select * from your_table where date != March214
drop table yourtable;
rename newable to yourtable;
create indexes if there are any.

2)partition your table and then delete. This will parallelize the delete operation.

3)partition your table in a way, so that you can do a drop a partition instead of doing a delete operation.

Reference: Asktom.