Solved

Oracle Interval Partitioning After Update

Posted on 2016-07-29
4
49 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
Comment Utility
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
Comment Utility
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
Comment Utility
What can I do to get rid of that space?
0
 
LVL 4

Expert Comment

by:Abhimanyu Suri
Comment Utility
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.

Join & Write a Comment

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
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

743 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now