Re: Partitioned table limitation

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: Goboxe <hadzramin(dot)ar(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Partitioned table limitation
Date: 2007-10-01 20:22:14
Message-ID: dcc563d10710011322r602c3a0bm85e955142fee28bc@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10/1/07, Goboxe <hadzramin(dot)ar(at)gmail(dot)com> wrote:
> Hi,
>
> Are there any limitations on number of child tables that can be use
> in
> partitioned table?
>
>
> I am currently having weekly partitioned tables (using partitioned
> view in SQL Server) that I kept for 2 years.
> In total, there will be 52 * 2 = 104 tables exist at one time in the
> partition.
>
>
> I am migrating from SQL Server to pg. Can pg support that number of
> tables?
>
>
> How about if I want to convert it as daily tables (356 * 2 years =
> 712
> tables).
> Is this recommended?

I've played around with as many as 1,000 child tables. By then, the
planning time becomes noticeably longer than for a single table, but
the response time is still so much faster that it's worth it. Note
I'm talking only a fraction of a second planning time, even at 1,000
tables.

If you are going over 100 tables, make sure you're using triggers for
updating the child tables not rules, as rules are far too slow when
there's over 50 or so tables to look choose from.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Phoenix Kiula 2007-10-01 20:30:52 Re: sha1 function
Previous Message Michael Glaesemann 2007-10-01 20:17:49 Re: Porting Schema from MySQL