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

Dmitry Tkach <dmitry@openratings.com>

From: Dmitry Tkach <dmitry@openratings.com>
To: softlist@codeangels.com
Cc: "Nigel J. Andrews" <nandrews@investsystems.co.uk>, pg_general <pgsql-general@postgresql.org>
Date: 2003-07-16T17:43:53Z
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