Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: how to implement a circular buffer in a table

Re: how to implement a circular buffer in a table

From: Galen Boyer <galenboyer_at_hotpop.com>
Date: 15 Aug 2001 16:54:06 -0500
Message-ID: <ud75wx1ub.fsf@verizon.net>

On 15 Aug 2001, oofoofoof_at_ureach.com wrote:

> I'm looking to design a table that has a fixed size.
> When the table reaches this size,

You will need to query the system tables to tell when you've reached the allotted size.

> new records added to the table will replace the oldest records,
> thus creating a circular buffer.

You need some way to recognize the oldest records. I would use a sequence number as a PK, and then delete the record with the min PK.

> How do I implement this efficiently?

By not having the size restriction.

When you submit this to the professor, let us know what grade you got.

-- 
Galen Boyer
It seems to me, I remember every single thing I know.
Received on Wed Aug 15 2001 - 16:54:06 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US