Database Tuning (MOSC)

MOSC Banner

batch delete

edited Mar 31, 2010 9:00AM in Database Tuning (MOSC) 17 commentsAnswered
Hello all.

I have couple of tables with 20 and 300+ mil rows. My application team needs to design a purge process to delete some of the rows based on currently unknown criteria. I don't want to run a delete because of its overhead and I'm planning the following approach

- create a temporary table with the same layout as the one to be purged

- copy the data from the base table into the temporary table except for the ones that need to be deleted (something like insert into temp_table (select * from base_table where < currently unknown condition>)

- truncate the base table, drop indices

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