Solved

Oracle Interval Partitioning After Update

Posted on 2016-07-29
4
62 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
4 Comments
 
LVL 76

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 73

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 4

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

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…
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

770 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