Home » SQL & PL/SQL » SQL & PL/SQL » BUlk Delete (oracle 10g)
BUlk Delete [message #425408] Fri, 09 October 2009 01:36 Go to next message
ramesh55.sse
Messages: 262
Registered: December 2008
Location: Hyderabad
Senior Member
We have 50 million data in one table i want to delete 20 mollion record from the table. How we can delete? What will be the effect in database?

plese give me one example with complete code.
Re: BUlk Delete [message #425409 is a reply to message #425408] Fri, 09 October 2009 01:41 Go to previous messageGo to next message
delna.sexy
Messages: 941
Registered: December 2008
Location: Surat, The Diamond City
Senior Member
Quote:
one example with complete code.

Laughing

Use BULK COLLECT with FORALL.

And to get help go to Oracle documentation.

regards,
Delna
Re: BUlk Delete [message #425413 is a reply to message #425408] Fri, 09 October 2009 01:50 Go to previous message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Save the rows you want to keep in a table, truncate the original one, and reinsert the saved rows.
Use CTAS, direct (append) insert and if possible parallelism.
This will be very fast and requires very fex redo logs.

Regards
Michel
Previous Topic: Lock the records While deleting
Next Topic: Flashback Truncated Table
Goto Forum:
  


Current Time: Sat Dec 10 09:25:52 CST 2016

Total time taken to generate the page: 0.09747 seconds