• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 163
  • Last Modified:

Partitioning Oracle table

I have a table and I like create partitioning and like to keep only last 10 days of data.The idea is to drop the partitioning using a  script (data which is older than 10 days ).Every day the table gets around half a million of rows except saturday and sunday . The table have the timestamp column.
How can I do the partitioning of this table so that it can be manageable using partitioning and I can manage and keep only 10 days of data. Please note that the data is not required older than 7 days but I will keep for another day or 2 ( so may be 10 days at the max).
0
Oranew
Asked:
Oranew
  • 3
  • 2
1 Solution
 
slightwv (䄆 Netminder) Commented:
What version of Oracle?

If you are on 11gR2 take a look interval partitioning.

There are restrictions so I suggest you look in the docs to see if this is an option for you:
Restrictions on Interval Partitioning

http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_7002.htm#SQLRF01402


Example and discussion here:
https://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:549370300346187664
0
 
OranewAuthor Commented:
Yes, 11g rel 2.
0
 
slightwv (䄆 Netminder) Commented:
Then the links above should be what you want.
0
 
OranewAuthor Commented:
The above link says the interval partition only works on date or number column  but I have timestamp so this is not for me.
0
 
slightwv (䄆 Netminder) Commented:
I'm not sure what you are reading that states a timestamp won't work but it will.

Check out the example in the AskTom link and you will see that it is based on a timestamp.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now