Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: how to implement a circular buffer in a table
"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 leaderReceived on Thu Aug 16 2001 - 08:12:42 CDT