partitioning question. need current month and archive partitions.

Поиск
Список
Период
Сортировка
От Sergey Levchenko
Тема partitioning question. need current month and archive partitions.
Дата
Msg-id e3ffbf240810240218u6c80b78cu629035946c57043e@mail.gmail.com
обсуждение исходный текст
Список pgsql-general
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!

В списке pgsql-general по дате отправления:

Предыдущее
От: "Thom Brown"
Дата:
Сообщение: Re: Storing questionnaire data
Следующее
От: Ludwig Kniprath
Дата:
Сообщение: Query m:n-Combination