Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 87823477250 for ; Mon, 7 Oct 2002 09:06:07 -0400 (EDT) Received: from www.pspl.co.in (www.pspl.co.in [202.54.11.65]) by postgresql.org (Postfix) with ESMTP id F3220477160 for ; Mon, 7 Oct 2002 08:47:21 -0400 (EDT) Received: (from root@localhost) by www.pspl.co.in (8.11.6/8.11.6) id g97CmuU31962 for ; Mon, 7 Oct 2002 18:18:56 +0530 Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161]) by www.pspl.co.in (8.11.6/8.11.0) with ESMTP id g97Cmuv31957; Mon, 7 Oct 2002 18:18:56 +0530 From: "Shridhar Daithankar" To: pgsql-admin@postgresql.org, pgsql-general@postgresql.org Date: Mon, 07 Oct 2002 18:17:53 +0530 MIME-Version: 1.0 Subject: Re: [GENERAL] Fast Deletion For Large Tables Reply-To: shridhar_daithankar@persistent.co.in Message-ID: <3DA1CFD1.15920.102CFBCC@localhost> In-reply-to: <20021005201740.20309.h016.c001.wm@mail.dilger.cc.criticalpath.net> X-mailer: Pegasus Mail for Windows (v4.02) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200210/51 X-Sequence-Number: 5909 On 5 Oct 2002 at 20:17, Nikolaus Dilger wrote: > 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. If you don't mind realigning your schema, inheriting tables can closely mimick partitions upto certain extent. Reading the original post below, I recommend you to consider inheritance approach. Create a base table which is empty and create inherited partitions. You can get all the data in child table by querying upon base table. So your application would not require any modification as long as selecting data is considered. You have to write a wrapper on insert/update/delete code to operate upon a particular partition. > There is no rowid in PostgreSQL. So while adding an > additional column with a sequence would help as long as > you have an index. Just indexing your date column > maybe easier. But then you pay with slower inserts or > the time and effort to build the index. There is oid and if you don't use it you can disable it saving some space if you have large data. HTH Bye Shridhar -- Bachelor: A man who chases women and never Mrs. one.