Monday, 15 March 2010

oracle10g - How can I remove table partitions from an Oracle table? -


I've found that the partitions used on a particular table are affecting the query execution and removing the partitions from the table Want to Is there an easy way to do this? There are 64 divisions in the table in question, on the basis of some initial investigation, I have come up with the following options, is there any better way?

  1. Copy the data to any other table, leave all the partitions, then copy the data back to the original table
  2. Copy the data to another table, Original table, then rename the new table and recreate the index
  3. Use the merge portion to merge all the partitions into one partition

Thoughts ?

Personally, I think that one type is the best way on option 2.

  1. Create a new table as * from the old table *
  2. index the new table (*)
  3. Old name To change the table slightly,
  4. Rename the new table with the old table name
  5. Switch any foreign key barriers from the old table to the new table Perhaps (

(*) possibly a non-partition table might transfer any grants, synonyms etc.

  • Separate one needs to be indexed separately if you are specifically associated with index names, then you use syntax after ALTER INDEX ... RENAME TO ... 6 can do.

    The advantage of this approach is that it reduces your downtime (basically steps 3, 4 and 5)


  • No comments:

    Post a Comment