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 EA482D1C93E for ; Tue, 29 Jul 2003 14:06: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 67781-10 for ; Tue, 29 Jul 2003 11:05:50 -0300 (ADT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.186]) by svr1.postgresql.org (Postfix) with ESMTP id C0D78D1C94E for ; Tue, 29 Jul 2003 11:06:43 -0300 (ADT) Received: from [212.227.126.161] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 19hV7k-0004Hc-00; Tue, 29 Jul 2003 16:06:44 +0200 Received: from [217.230.193.186] (helo=ecologic.de) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 19hV6E-0003DJ-00; Tue, 29 Jul 2003 16:05:10 +0200 Message-ID: <3F267F15.9060705@ecologic.de> Date: Tue, 29 Jul 2003 16:05:09 +0200 From: Dani Oderbolz User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ray Ontko , "'pgsql-admin@postgresql.org'" Subject: Re: Partition DB Tables by month References: <3F25BC0B.3050000@ragingnet.com> <3F265EC3.5010603@ecologic.de> <20030729124246.GA15298@ontko.com> In-Reply-To: <20030729124246.GA15298@ontko.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/285 X-Sequence-Number: 9625 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. Regards, Dani