3 ms·
How does this work in Oracle? Seeing as the partitioning constraint would be time-dependent, wouldn't it need to re-evaluate it at regular intervals in order to
by lobster_johnson 10y ago
How does this work in Oracle? Seeing as the partitioning constraint would be time-dependent, wouldn't it need to re-evaluate it at regular intervals in order to shuffle data around? Is the feature explicitly time-oriented?
- mulmen 10y agoI don't think oracle can do this exactly but the query planner does understand time based partitions so if you do something like: SELECT * FROM partitioned_table WHERE partition_date_key > SYSDATE - 1; The query planner will only use the most recent partition. Combine this with Oracle's ability to merge partitions and you get "daily" partitions that become "weekly" partitions when the new week starts. Alternately you could wait a month and combine all the days of last month into a single partition and then even combine months into years. The partition intervals are based on specific dates/times, not on the relative time from query execution. Oracle also supports row movement which is the biggest missing feature here I believe.
- vithlani 10y agoYou need to write a function/job that looks at the current partitions for a table and does the "rollover". Then you add this to an Oracle Scheduler task...