Home » RDBMS Server » Server Administration » data purge
data purge [message #332208] Mon, 07 July 2008 21:38 Go to next message
caprikar
Messages: 226
Registered: March 2007
Senior Member
Hi,
I have a table with 30 million records and i want to delete 50% of data ie 15million records. I dont want to fragment or consume resource by deleting those records instead am thinking of creating temp table and insert the records i want and then rename the table. can anyone tell me whats the best way of doing this?
Thanks
Re: data purge [message #332217 is a reply to message #332208] Mon, 07 July 2008 23:21 Go to previous messageGo to next message
kamkan
Messages: 27
Registered: April 2007
Location: Chennai, INDIA
Junior Member
Hi,
You shall export required data if you could able to refine using WHERE clause. Truncate table and import from dump. Otherwise quick option is create another table, insert required data with commit every n rows using PLSQL block.
Re: data purge [message #332219 is a reply to message #332208] Mon, 07 July 2008 23:32 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
caprikar wrote on Mon, 07 July 2008 19:38
Hi,
I have a table with 30 million records and i want to delete 50% of data ie 15million records. I dont want to fragment or consume resource by deleting those records instead am thinking of creating temp table and insert the records i want and then rename the table. can anyone tell me whats the best way of doing this?
Thanks



What business justification is there for expending computing resources to first stored into the data & the discard 50% of the "data"?
Lots of data movement, but how much real progress?

Will it be the case that the 50% which remains from this task today, be subsequently disposed at a later date?
Re: data purge [message #332371 is a reply to message #332208] Tue, 08 July 2008 06:42 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Have a look at this link from AskTom
It's about Updates, but the logic applies to Deletes too.
Previous Topic: Default schemas and tables created by Oracle
Next Topic: Creating New SID in Linux
Goto Forum:
  


Current Time: Mon Jul 22 14:49:14 CDT 2024