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: FIFO in Oracle

Re: FIFO in Oracle

From: James Lorenzen <lorenzen_at_tiny.net>
Date: 1998/02/17
Message-ID: <lorenzen-ya02408000R1602982007340001@news.visi.com>#1/1

In article <887209942.1900544018_at_dejanews.com>, ketanindia_at_hotmail.com wrote:

>Hi Micheal,
>I suggest u 2 different ways -
>
>1. The FIFO table should have a column which will be populated by the
>sequence. And there will be an index on this column. Let's say we call
 

>> Our company is going to develop an Oracle application that requires to
>> store requests in a database table (let's name in DB Queue) and later on
>> another server program will pick up the requests and process in a FIFO
>> fashion.
>>
>> The question is how can I do it in Oracle efficiently. It seems to me the
>> server need to read all the requests and sort by time stamp when every
>> time the server program is free to do something.
>>

I think the "best" method would be to key your requests with an Oracle sequence and fetch with a where clause "key_field > 0", this will use the index, no sorting. Then delete the request. This will provide the FIFO processing.

HTH
   James

-- 
lorenzen_at_visi.com             | Life is complex; it has
                              |   real and imaginary parts
Received on Tue Feb 17 1998 - 00:00:00 CST

Original text of this message

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