partitioning question. need current month and archive partitions.

Started by Sergey Levchenkoover 17 years ago1 messagesgeneral
Jump to latest
#1Sergey Levchenko
sector119@gmail.com

Hi All!

I have a table - transaction pool - with a lot of rows, but I use only
data for the latest month, or current year in my computations.
How can I split data to partitions like that if I can't use CHECK
constraints with non constant objects like, extract('month' from
CURRENT_DATE), extract('year' from CURRENT_DATE):

transaction_pool - master table

transaction_currentmonth - table contains transactions commited
_only_ this (current) month
transaction_currentyear - table contains all transaction for this
year except for transaction_currentmonth rows

transaction_archive - table contains everything except for
transaction_currentmonth, transaction_currentyear rows

Will it be helpful to make such a kind of partitioning?

Thanks a lot!