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: Dusan Bolek <pagesflames_at_usa.net>
Date: 16 Aug 2001 06:12:42 -0700
Message-ID: <1e8276d6.0108160512.79ca444c@posting.google.com>


"Stephen T. Parfitt" <steve.parfitt_at_sympatico.ca> wrote in message news:<3B7B3391.F9A2EE42_at_sympatico.ca>...
> Create a SEQUENCE with a MAXVALUE and the CYCLE option ... then use this
> sequence as the primary key. Presumably, you will need a bit of logic
> to do INSERTs on the first cycle and UPDATEs thereafter when the
> circular buffer is overwriting itself - or else initialize the buffer
> with dummy values beforehand.

Looks nice, but there will be problem with rollbacks. After few rollbacks some "eternal" rows will appear. Of course, in next cycle those rows can be deleted, but if this should be some kind of log or something similar then rows which are out of time can be a problem.

--
_________________________________________

Dusan Bolek, Ing.
Oracle team leader
Received on Thu Aug 16 2001 - 08:12:42 CDT

Original text of this message

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