Solved

Oracle Interval Partitioning After Update

Posted on 2016-07-29
4
88 Views
Last Modified: 2016-07-29
Dear Experts,

I have a table A with interval partitioning. The partitioning key is XCURDATE with DATE type. I wonder what happens to the affected rows if I update XCURDATE to a future date using Update DML statement? Are afftected rows moved to a new partition? What happens to the previous partition, does this affect table size with redundant used space?

Best Regards.
0
Comment
Question by:GurcanK
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 77

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 200 total points
ID: 41734590
It depends on how you created the table.

I find the online documentation to be an invaluable resource:
https://docs.oracle.com/cd/E18283_01/server.112/e16541/part_admin001.htm

When you create (or alter) a partitioned table, a row movement clause (either ENABLE ROW MOVEMENT or DISABLE ROW MOVEMENT) can be specified. This clause either enables or disables the migration of a row to a new partition if its key is updated. The default is DISABLE ROW MOVEMENT.
1
 
LVL 74

Accepted Solution

by:
sdstuber earned 300 total points
ID: 41734597
If you do have row movement enabled, then new partitions will be created as needed.
The space already allocated from the old partitions is NOT released when the row is moved out of the old partition into a new one.

Similar to deleting a row from a table, the space is still there, waiting to be used by another row.
1
 

Author Comment

by:GurcanK
ID: 41734607
What can I do to get rid of that space?
0
 
LVL 5

Expert Comment

by:Abhimanyu Suri
ID: 41734661
Shrink partitions is one way to get space back.
If all rows have been updated then partition can be truncated depending on application requirement.
1

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
Via a live example, show how to take different types of Oracle backups using RMAN.

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question