Re: [ADMIN] Fast Deletion For Large Tables

Поиск
Список
Период
Сортировка
От Shridhar Daithankar
Тема Re: [ADMIN] Fast Deletion For Large Tables
Дата
Msg-id 3DA1CFD1.15920.102CFBCC@localhost
обсуждение исходный текст
Ответ на Re: [ADMIN] Fast Deletion For Large Tables  ("Nikolaus Dilger" <nikolaus@dilger.cc>)
Список 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.


В списке pgsql-general по дате отправления:

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: deadlock using sequences?
Следующее
От: Thomas O'Dowd
Дата:
Сообщение: why isn't index used?