Home » SQL & PL/SQL » SQL & PL/SQL » Partitioned Tables
Partitioned Tables [message #148843] Mon, 28 November 2005 11:06 Go to next message
9idba
Messages: 2
Registered: November 2005
Location: Framingham
Junior Member
Hi there

We've a table that has 27 partitions, and about 54 million records. Now we've decided to remove about 32 million records (records that are before 31-Dec-2002). Could you let me know the best way to remove these records.

Any help is much appreciated.

Thank You
9iDBA
Re: Partitioned Tables [message #148865 is a reply to message #148843] Mon, 28 November 2005 15:36 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
Drop the partitions that contain data before 31-DEC-2002. It's pretty much instantaneous. Unless of coure, your partition key is not on the intended target column.
Re: Partitioned Tables [message #149039 is a reply to message #148843] Tue, 29 November 2005 15:36 Go to previous message
skgoel
Messages: 16
Registered: November 2005
Junior Member
I am not sure if your problem has been resolved, but if the partition key is not on the date then you may want to export the data from the table using EXP utility and the WHERE clause on the date,

then truncate the table

followed by import of data in the table using IMP utility.


Instead of exp/imp you can create another work table for the data that you want, truncate the original table and insert the data back from the work table.

Shakti
http://www.impact-sol.com
Developers of Guggi Oracle - Tool for DBAs and Developers
Previous Topic: CTL to load entire file in VARCHAR2(4000)
Next Topic: ORA-00972: identifier is too long
Goto Forum:
  


Current Time: Sat Nov 23 19:23:57 CST 2024