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

Home -> Community -> Usenet -> comp.databases.theory -> Re: NextNumbers Tables

Re: NextNumbers Tables

From: Jason W. Paul <nobody_at_nowhere.com>
Date: Tue, 11 Feb 2003 22:53:01 -0500
Message-ID: <3e49a868$0$99433$a04e5680@nnrp.fuse.net>

>

> If you want to do it that way, I'd go for the first approach.
> Just on caveat: The way to go is first increment the number then select
it.
> Otherwise, you'll run into trouble in a multiuser environment where two
> users want to insert at the same time.

How does doing one "first" solve this problem. The *only* way around it is to make it atomic -- where they both (increment & select) appear to happen at the same time. This will depend on your DBMS's transaction support. Doing either one "first" will result in the same issue! Think about it.

FYI -- I disagree with this method entirely as it will, in high volume environments, create severe "hotspots" on these tables. If you don't have high volume, it might not be an issue. Received on Tue Feb 11 2003 - 21:53:01 CST

Original text of this message

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