?
Solved

Oracle Interval Partitioning After Update

Posted on 2016-07-29
4
Medium Priority
?
95 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 800 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 1200 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

Introducing Priority Question

Increase expert visibility of your issues by participating in Priority Question, our latest feature for Premium and Team Account holders. Adjust the priority of your question to get emergent issues in front of subject-matter experts for help when you need it most.

Question has a verified solution.

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

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Suggested Courses

771 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