Re: Postgresql "FIFO" Tables, How-To ?

From: Dmitry Tkach <dmitry(at)openratings(dot)com>
To: softlist(at)codeangels(dot)com
Cc: "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk>, pg_general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Postgresql "FIFO" Tables, How-To ?
Date: 2003-07-16 17:43:53
Message-ID: 3F158ED9.2070505@openratings.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>
>
>
>Ouch, this means that for every insert we would have to trigger a
>procedure which will:
>
>COUNT
>IF > Limit
>DELETE OLDEST
>
>This would be pretty much damn ressource intensive on a table with million
>of records, would not it ?
>
>

You can keep the count in a table on the side, and have it updated by
the same trigger (after insert or delete)...

Dima

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Maksim Likharev 2003-07-16 17:52:40 Re: ODBC query problem
Previous Message Andrew Sullivan 2003-07-16 17:40:17 Re: ODBC query problem