X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 82CD43A483E for ; Fri, 21 Jan 2005 14:37:20 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 18712-05 for ; Fri, 21 Jan 2005 14:37:07 +0000 (GMT) Received: from mail.fluidhosting.com (mail1.fluidhosting.com [66.150.201.101]) by svr1.postgresql.org (Postfix) with SMTP id 168283A4AB3 for ; Fri, 21 Jan 2005 14:37:10 +0000 (GMT) Received: (qmail 58183 invoked by uid 399); 21 Jan 2005 14:37:09 -0000 Received: from unknown (HELO ?127.0.0.1?) (194.185.112.82) by mail1.fluidhosting.com with SMTP; 21 Jan 2005 14:37:09 -0000 Message-ID: <41F113A0.1020908@beccati.com> Date: Fri, 21 Jan 2005 15:37:20 +0100 From: Matteo Beccati User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it-IT; rv:1.8a6) Gecko/20050111 X-Accept-Language: it, en-us, en MIME-Version: 1.0 To: Yann Michel Cc: Matt Casters , pgsql-performance@postgresql.org Subject: Re: References: <16153.193.190.212.113.1106213675.squirrel@193.190.212.113> <20050120142603.GM10437@ns.snowman.net> <33c6269f050120083177fa0e83@mail.gmail.com> <20050121001427.GA10806@wolff.to> <12670.193.190.212.113.1106297446.squirrel@193.190.212.113> <20050121123008.GA13904@zoom.spline.inf.fu-berlin.de> In-Reply-To: <20050121123008.GA13904@zoom.spline.inf.fu-berlin.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200501/383 X-Sequence-Number: 10073 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