All Forums Database
ShaheryarIqbal 2 posts Joined 02/11
06 Mar 2011
RE: Partitioned Primary Indexes (PPI) -- Altering Partitions


The most obvious use for the partitioning would be DATE. Based on the kind of queries we currently receive, the ranging would be something like.

Current Date to 30 days ago, split by DAY
1 month ago to 12 months ago, split by Month

I know this can be done.

My questions are regards to keeping this range a moving window.

I understand that it would be necessary to perform an ALTER TABLE on a regular basis to keep the above scenario. Can this be automated, so each month, the system automatically moves the range windows? Can you use the CURRENT_DATE function or do you need to specify a constant date.”

Or how can a DBA maintain this as a manual process?

Any help will be highly appreciated.



ShaheryarIqbal 2 posts Joined 02/11
06 Mar 2011

I am working on Teradata 12.

Jim Chapman 449 posts Joined 09/04
07 Mar 2011

A new feature in 13.10 allows you to use CURRENT_DATE or CURRENT_TIMESTAMP in a partitioning expression. However, it is not reevaluated automatically. You must periodically execute the statement ALTER TABLE TO CURRENT to cause the table's partitioning to be recomputed using the current system time.

You must sign in to leave a comment.