Re: [GENERAL] Fast Deletion For Large Tables

From: "Shridhar Daithankar" <shridhar_daithankar(at)persistent(dot)co(dot)in>
To: pgsql-admin(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Fast Deletion For Large Tables
Date: 2002-10-07 12:47:53
Message-ID: 3DA1CFD1.15920.102CFBCC@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support pgsql-admin pgsql-general

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.

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message Johnson, Shaunn 2002-10-07 22:45:44 meaning of following errors
Previous Message Nikolaus Dilger 2002-10-06 03:17:38 Re: [ADMIN] Fast Deletion For Large Tables

Browse pgsql-admin by date

  From Date Subject
Next Message Devinder K Rajput 2002-10-07 22:20:59 Query takes too long to run
Previous Message Jun Tanamal 2002-10-07 00:35:44 Re: affected by ISP/DNS change

Browse pgsql-general by date

  From Date Subject
Next Message Shridhar Daithankar 2002-10-07 13:06:29 Re: Stored Procedures
Previous Message Thomas O'Dowd 2002-10-07 12:46:11 why isn't index used?