Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

What has to be done to introduce range partitions into an existing non-partitioned table in oracle? Is there an easy to do and safe way to do this?

Especially in cases where there are many constraints on the table like foreign keys.

share|improve this question

migrated from stackoverflow.com Mar 10 '11 at 22:01

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer 1

up vote 5 down vote accepted

I think this document will demonstrate the steps needed. IT is not a non-trivial thing to do.

share|improve this answer
1  
Thanks! Is there a reason why oracle doesn't provide a possibility to do this with a simple "alter table partition ..." statement? –  lewap Mar 10 '11 at 16:57
2  
I suspect Oracle doesn't provide a simpler syntax because people with large, unpartitioned existing tables will frequently want to have very fine-grained control about how they move their data to a partitioned table. Doing an exchange partition and then splitting the partitions can be syntactically straightforward but generate substantial performance problems. Creating a new table with the appropriate partitions and moving the data over can be parallelized and is relatively simple but it generally requires downtime. Using DBMS_REDEFINITION can be done online but may require monitoring. –  Justin Cave Mar 10 '11 at 22:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.