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

Home -> Community -> Usenet -> c.d.o.misc -> Re: ORDER BY vs MIN to implement FIFO

Re: ORDER BY vs MIN to implement FIFO

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Sat, 26 Jun 2004 22:49:56 -0700
Message-ID: <1088315423.883877@yasure>


Saeed wrote:

> In message <MTWCc.3166$Z14.3895_at_news.indigo.ie>, D Rolfe
> <dwrolfeFRUITBAT_at_orindasoft.com> writes
>

>>
>>
>> Turkbear wrote:
>>
>>>  A sequence will be , by definition,sequential ( unless explicitly 
>>> altered or created with a CYCLE and MIN/MAX  parameters ,
>>> in which case the uniqueness would also be lost) but it  may not be 
>>> an uninterrupted sequence however since rollbacks, etc
>>> will leave gaps in the sequence-
>>> ( it could be 1,3,7, 21,45 - but not 1,3,2,4,17,6,28)
>>
>>
>> Your are assuming that the application is smart enough not to hang 
>> around and waste time between obtaining NEXTVAL and creating the 
>> record that uses it. If there is user interaction involved the time 
>> lag could be days and 'sequentiall-ness' could be lost.
>>
>> David Rolfe
>> Orinda Software
>> Dublin, Ireland
>>

>
> Once again it seems a simple question on a very specific area results in
> more responses from a side issue. If anyone ever raises a question about
> the use of sequences for this purpose, I might contribute my 2 penneth.
>
> My question regarding relative merits of MIN vs ORDER BY is still valid
> if viewed as an illustrative example, and any ideas would be gratefully
> received.
>
> Kind regards,
>
> Saeed

My instinct would be to use MIN with a hash cluster. But what exactly are you implying with OPEN FETCH CLOSE ... this appears to be an inappropriate use of a cursor.

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Sun Jun 27 2004 - 00:49:56 CDT

Original text of this message

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