Re: Table partitioning based on multiple criterias possible? - Mailing list pgsql-general

From Richard Huxton
Subject Re: Table partitioning based on multiple criterias possible?
Date
Msg-id 46E7A675.4030304@archonet.com
Whole thread Raw
In response to Table partitioning based on multiple criterias possible?  (Ow Mun Heng <Ow.Mun.Heng@wdc.com>)
Responses Re: Table partitioning based on multiple criterias possible?
List pgsql-general
Ow Mun Heng wrote:
> New to Pg and wondering the extent of PG's table partitioning
> capability.
>
> I have a huge table > 18 million rows(growth rate ~8 million a week)
> which I like to implement partitioning.

OK

> Initially the plan is to just partition it by date. eg: 1 partition per
> month.

Fair enough - do you do a lot of searching by date?

> Now, I'm thinking if it's possible to also partition them by
> product/items.
>
> is it possible to do multilevel partitioning sort of like
>
> if month = July then go to July Parition
>     if Product = Shampoo then go to shampoo partition
>         elif Product = Soap then go to soap partition

Well, I suppose you could partition over (month,product) but you
probably don't want to. Sounds fiddly to manage.

Have you verified that performance will be a problem without this?

--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: Stefan Schwarzer
Date:
Subject: Database/Table Design for Global Country Statistics
Next
From: Richard Huxton
Date:
Subject: Re: Question to schema public