Re: - Mailing list pgsql-performance

From Matteo Beccati
Subject Re:
Date
Msg-id 41F113A0.1020908@beccati.com
Whole thread Raw
In response to Re:  (Yann Michel <yann-postgresql@spline.de>)
Responses Re:
List pgsql-performance
Hi,

>>>>  CREATE TABLE super_foo ( partition NUMERIC, bar NUMERIC );
>>>>  ANALYZE super_foo ;
>>>>
>>>>  CREATE TABLE sub_foo1 () INHERITS ( super_foo );
>>>>  CREATE TABLE sub_foo2 () INHERITS ( super_foo );
>
> Yes, this could be used instead of a view. But there is one thing
> missing. You can't just insert into super_foo and aquire the "correct
> partition". You will still have to insert into the correct underlying
> table. "Real" partitioning will take care of correct partition
> selection.

I've recently used this method for partitioning data. In my setup
inserts are done inside a pl/pgsql function called at regular intervals,
so this isn't a problem for me. I didn't test it, but I think some rules
(or a trigger) could do the trick.


Best regards
--
Matteo Beccati
http://phpadsnew.com
http://phppgads.com


pgsql-performance by date:

Previous
From: "Merlin Moncure"
Date:
Subject: Re: [SQL] OFFSET impact on Performance???
Next
From: "Joshua D. Drake"
Date:
Subject: Re: PostgreSQL clustering VS MySQL clustering