Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Bulk insert/delete

Re: Bulk insert/delete

From: joel garry <joel-garry_at_home.com>
Date: 31 May 2006 16:42:07 -0700
Message-ID: <1149118927.829159.103720@y43g2000cwc.googlegroups.com>

GL wrote:
> Thank you Vladimir ,
> The logic behind this: the table1 has 80-200 mil or rows, and it has 10
> different categories. clean up should process these categories in
> different way.,i.e data should be sum,avg,max etc inside the given
> category in the certain data ranges.These set of data should be
> kept.The avarage amount of data to keep around 2-5 mil rows.
> And COMMIT should happened only when category is done and then will
> proceed to next, so on and so on

You should follow Vladimir's advice in creating new table(s) for the data you want to keep, then truncating the original table and inserting from the other tables. The reason is you don't want to wind up with a too-high highwatermark in your table, as well as holey indices. Assuming you have sufficient downtime and disk space to do it "correctly."

Most of the time, if you can do something in straight sql rather than pl/sql, performance will be better. If you are doing sums and such within categories within a single table, you may have some normalization issues that require doing it "wrong," in which case you need to give specifics to get proper advice, and perhaps learn some hard lessons. asktom.oracle.com has some discussions on how to mass delete, which Vladimir appears to have succinctly summarized.

jg

--
@home.com is bogus.
This medley of jungle sounds has been brought to you by The Committee.
http://www.signonsandiego.com/uniontrib/20060531/news_1b31settle.html
Received on Wed May 31 2006 - 18:42:07 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US