Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: reading sequence.CURRVAL
>Venkat wrote:
>
> er... Pardon my asking but can't you read the max value from the table and
> compare it to the previous max to see if new rows have been added ?
Bill Dietrich <bill_dietrich_at_wayfarer.com> replied:
>Yes, that is exactly what I'm doing as a work-around, but
>that seems a lot less efficient than just reading a single
>value (the sequence.CURRVAL).
Bill,
make sure you use an INDEX_DESC hint when obtaining the MAX value. Then the optimiser can get the maximum value with a single hit, rather than having to read the entire index to obtain the greatest value.
Dave.
--
To reply by email, remove the "no-spam" bit from my email address. Received on Fri Apr 24 1998 - 04:11:43 CDT
![]() |
![]() |