From: Ross J. Reedstrom <reedstrm@rice.edu>
To: Nikolaus Dilger <nikolaus@dilger.cc>
Cc: raymond.chui@noaa.gov
Cc: pgsql-admin@postgresql.org
Cc: pgadmin-support@postgresql.org
Cc: pgsql-general@postgresql.org
Subject: Re: [ADMIN] Fast Deletion For Large Tables
Date: Wed, 16 Oct 2002 11:10:32 -0500
Message-ID: <20021016161031.GA17094@rice.edu> (raw)
In-Reply-To: <20021005201740.20309.h016.c001.wm@mail.dilger.cc.criticalpath.net>
References: <20021005201740.20309.h016.c001.wm@mail.dilger.cc.criticalpath.net>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: reedstrm@rice.edu, nikolaus@dilger.cc, raymond.chui@noaa.gov, pgadmin-support@postgresql.org, pgsql-general@postgresql.org
Subject: Re: [ADMIN] Fast Deletion For Large Tables
In-Reply-To: <20021016161031.GA17094@rice.edu>
References: <20021005201740.20309.h016.c001.wm@mail.dilger.cc.criticalpath.net> <20021016161031.GA17094@rice.edu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox