Re: Partitioning Option?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Partitioning Option?
Дата
Msg-id 21428.1109185946@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Partitioning Option?  ("Tomeh, Husam" <htomeh@firstam.com>)
Ответы Re: Partitioning Option?  (Gaetano Mendola <mendola@bigfoot.com>)
Список pgsql-admin
"Tomeh, Husam" <htomeh@firstam.com> writes:
> (I was referring to object partitioning. For instance, if I have a huge
> table with US counties as my partition key, I could create partitions
> within the same table based on the partition key (a US county for
> example). When querying, the engine will access the partition instead of
> the whole table to get the result set. This is provided in Oracle DB EE.
> So, I was wondering whether I can do similar thing in PostgreSQL since
> we're exploring PostgreSQL)

You can build it out of spare parts: either a view over a UNION ALL of
component tables, or a parent table with a bunch of inheritance
children, either way with rules to redirect insertions into the
right subtable.  (With the inheritance way you could instead use
a trigger for that, which'd likely be more flexible.)

It's not going to be quite as good as the Oracle facility, mainly
because the planner has no direct understanding that it's a partitioning
setup, but you can get most of the win.

See past discussions in the mailing list archives for details.

            regards, tom lane

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

Предыдущее
От: "Cory Vokey"
Дата:
Сообщение: Re: Lingering Checkpoint Process
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: Partitioning Option?