Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: ORDER BY vs MIN to implement FIFO
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 >>
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