From: | "Steven Flatt" <steven(dot)flatt(at)gmail(dot)com> |
---|---|
To: | "Pablo Alcaraz" <pabloa(at)laotraesquina(dot)com(dot)ar> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: tables with 300+ partitions |
Date: | 2007-10-30 21:00:10 |
Message-ID: | 357fa7590710301400x3a05796dle6bae219a1a25fc@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On 10/30/07, Pablo Alcaraz <pabloa(at)laotraesquina(dot)com(dot)ar> wrote:
>
> I did some testing. I created a 300 partitioned empty table. Then, I
> inserted some rows on it and the perfomance was SLOW too.
Is the problem with inserting to the partitioned table or selecting from
it? It sounds like inserting is the problem in which case I ask: how are
you redirecting inserts to the appropriate partition? If you're using
rules, then insert performance will quickly degrade with number of
partitions as *every* rule needs to be evaluated for *every* row inserted to
the base table. Using a trigger which you can modify according to some
schedule is much faster, or better yet, use some application-level logic to
insert directly to the desired partition.
Steve
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2007-10-30 21:46:45 | Re: Two fast queries get slow when combined |
Previous Message | cluster | 2007-10-30 20:48:16 | Two fast queries get slow when combined |