X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id EF26FD1C9DD for ; Tue, 29 Jul 2003 23:54:45 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 10788-02 for ; Tue, 29 Jul 2003 20:53:48 -0300 (ADT) Received: from smtp.noos.fr (nan-smtp-06.noos.net [212.198.2.75]) by svr1.postgresql.org (Postfix) with ESMTP id CC445D1C4CB for ; Tue, 29 Jul 2003 20:54:43 -0300 (ADT) Received: (qmail 20595429 invoked by uid 0); 29 Jul 2003 23:54:45 -0000 Received: from unknown (HELO gmendola) ([212.198.37.110]) (envelope-sender ) by 212.198.2.75 (qmail-ldap-1.03) with SMTP for ; 29 Jul 2003 23:54:45 -0000 Message-ID: <00b701c3562c$a9aa83e0$10d4a8c0@mm.eutelsat.org> From: "Mendola Gaetano" To: Cc: "Dani Oderbolz" References: <3F25BC0B.3050000@ragingnet.com> <3F265EC3.5010603@ecologic.de> <20030729124246.GA15298@ontko.com> <3F267F15.9060705@ecologic.de> Subject: Re: Partition DB Tables by month Date: Wed, 30 Jul 2003 01:53:51 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/313 X-Sequence-Number: 9653 "Dani Oderbolz" wrote: > Ray Ontko wrote: > > >One limitation to the UNION approach is that you can't > >insert, update, or delete through the UNION view. At > >some point the application needs to understand how the > >virtual table is partitioned into these month-specific > >tables. > > > >Romido: Why not simply delete the rows each month instead > >of dropping tables each month? > > > Hmm, > but it wouls surely be possible (at the cost of some performace) > to put a trigger on the view to actually sort this all out. > I guess deleting is a really bad option, as > 1. The DB needs to do all kinds of logging which you donmm't want (you > dont want to rollback ever) > 2. This operations leaves you with a big Vacuum job > > Therefore, I think, Partitioning could be a good thing. > BDW: This might be a really important reason for a > company to switch their Data Warehouse to Postgres, > as this is almost impossible without it. If the goal is have the query optimized for the last month you can easilly accomplish this using a partial index. Regards Gaetano Mendola