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: Should I use max()

Re: Should I use max()

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Mon, 10 May 1999 12:51:16 GMT
Message-ID: <3736d5cd.2627748@192.86.155.100>


A copy of this was sent to "Ray" <raymond_at_gmwgroup.com> (if that email address didn't require changing) On 10 May 1999 12:27:52 GMT, you wrote:

>Should I use max(n)+1 to assign a new seq. no. on a large table with >100
>user environment?
>Any performance issue?
>
>Raymond

Is there any reason why you cannot use a sequence?

"select my_sequence_name.nextval from dual"

will generate a non-blocking sequence number. Many users can select from it, each getting their own sequence number without blocking eachother.

Using a table with max(n)+1 will serialize all transactions (only 1 transaction at a time).

See http://www.oracle.com/ideveloper/ for my column 'Digging-in to Oracle8i'...  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA

--
Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Mon May 10 1999 - 07:51:16 CDT

Original text of this message

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