Re: On partitioning

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: On partitioning
Дата
Msg-id 54873BE9.2090802@agliodbs.com
обсуждение исходный текст
Ответ на On partitioning  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: On partitioning  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-hackers
On 12/09/2014 12:17 AM, Amit Langote wrote:
>> Now if user wants to define multi-column Partition based on
>> > monthly_salary and annual_salary, how do we want him to
>> > specify the values.  Basically how to distinguish which values
>> > belong to first column key and which one's belong to second
>> > column key.
>> >
> Perhaps you are talking about "syntactic" difficulties that I totally missed in my other reply to this mail?
> 
> Can we represent the same data by rather using a subpartitioning scheme? ISTM, semantics would remain the same.
> 
> ... PARTITION BY (monthly_salary) SUBPARTITION BY (annual_salary)?

... or just use arrays.

PARTITION BY LIST ( monthly_salary, annual_salary )PARTITION salary_small VALUES ({[300,400],[5000,6000]})
) ....

... but that begs the question of how partition by list over two columns
(or more) would even work?  You'd need an a*b number of partitions, and
the user would be pretty much certain to miss a few value combinations.Maybe we should just restrict list partitioning
toa single column for
 
a first release, and wait and see if people ask for more?

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: logical column ordering
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: moving from contrib to bin