Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id DFEBD476011; Wed, 16 Oct 2002 12:10:28 -0400 (EDT) Received: from ece.rice.edu (ece.rice.edu [128.42.4.34]) by postgresql.org (Postfix) with ESMTP id 75C5B475FC1; Wed, 16 Oct 2002 12:10:28 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by ece.rice.edu (Postfix) with ESMTP id 518F768A79; Wed, 16 Oct 2002 11:10:33 -0500 (CDT) Received: from wallace.ece.rice.edu (wallace.ece.rice.edu [128.42.12.154]) by ece.rice.edu (Postfix) with ESMTP id 8336A68A78; Wed, 16 Oct 2002 11:10:32 -0500 (CDT) Received: from reedstrm by wallace.ece.rice.edu with local (Exim 3.34 #1 (Debian)) id 181qki-0004bw-00; Wed, 16 Oct 2002 11:10:32 -0500 Date: Wed, 16 Oct 2002 11:10:32 -0500 From: "Ross J. Reedstrom" To: Nikolaus Dilger Cc: raymond.chui@noaa.gov, pgsql-admin@postgresql.org, pgadmin-support@postgresql.org, pgsql-general@postgresql.org Subject: Re: [ADMIN] Fast Deletion For Large Tables Message-ID: <20021016161031.GA17094@rice.edu> Mail-Followup-To: "Ross J. Reedstrom" , Nikolaus Dilger , raymond.chui@noaa.gov, pgsql-admin@postgresql.org, pgadmin-support@postgresql.org, pgsql-general@postgresql.org References: <20021005201740.20309.h016.c001.wm@mail.dilger.cc.criticalpath.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021005201740.20309.h016.c001.wm@mail.dilger.cc.criticalpath.net> User-Agent: Mutt/1.3.27i X-Virus-Scanned: by AMaViS snapshot-20020300 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200210/40 X-Sequence-Number: 805 On Sat, Oct 05, 2002 at 08:17:38PM -0700, Nikolaus Dilger wrote: > Raymond, > > Partitioned tables would solve your issue since you > could just truncate a partiotion in order to delete the > unneeded data. Unfortunately they are not available in > PostgreSQL. But maybe in a future release. > > Unfortunately you also cannot use a UNION ALL in a view > to fake partitions. > Hmm, you haven't tried this recently, have you? With pgsql 7.2.1, It seems to work just fine: test=# create view transactions as select * from monday union all select * from tuesday union all select * from wednesday ; CREATE test=# \d transactions View "transactions" Column | Type | Modifiers ----------+---------+----------- daynum | integer | transact | integer | View definition: (SELECT monday.daynum, monday.transact FROM monday UNION ALL SELECT tuesday.daynum, tuesday.transact FROM tuesday) UNION ALL SELECT wednesday.daynum, wednesday.transact FROM wednesday; test=# select * from transactions; daynum | transact --------+---------- 1 | 1 1 | 2 1 | 3 2 | 4 2 | 5 2 | 6 (6 rows) test=# Ross