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: CURRVAL in multi-user environments

Re: CURRVAL in multi-user environments

From: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Thu, 06 Jun 2002 20:24:20 GMT
Message-ID: <3CFFC4EA.E09A91BA@exesolutions.com>


Thomas Gaines wrote:

> Matt -
>
> I intended no smugness in my original response to your question.
> I've dealt with a number of rather easy-to-answer inquiries in various
> forums, and instead of just telling the person the easy answer, I
> like to point that person to the documentation or just encourage him
> or her to run a little code and find out for himself. The ability to
> research an answer is too often neglected these days, IMHO.
>
> Remember that newsgroups like this (as well as other forms of assistance
> like Wrox Publishing P2P) are meant as a public service, and no one
> here is obligated to do your work for you. We enjoy helping others,
> but we'd rather see you giving your question as much effort as you
> reasonably can before calling on others. I'm not a big fan of
> old sayings and proverbs, but an old Chinese proverb says "Give
> a man a fish, and he'll eat for a day. Teach him how to
> fish and he'll eat forever." I have to agree. Daniel Morgan probably
> does, too.
>
> Why, it's enough to turn one onto the Republican party! ;-)
>
> TG
>
> Matthew Nicoll wrote:
>
> > Thanks for the smug help, gentlemen.
> >
> > On Wed, 22 May 2002 15:03:32 GMT, Daniel Morgan
> > <dmorgan_at_exesolutions.com> wrote:
> >
> > >Thomas Gaines wrote:
> > >
> > >> Matt -
> > >>
> > >> This sounds simple enough to test. Give it a try and answer
> > >> your own question...
> > >>
> > >> TG
> > >>
> > >> Matthew Nicoll wrote:
> > >>
> > >> > The Oracle documentation I have seen suggests I can define a sequence,
> > >> > then use sequence_name.NEXTVAL for an ID for a parent row,
> > >> > then use sequence_name.CURVAL in subsequent writes to child rows.
> > >> >
> > >> > In a multi-user environment, if the order of events is:
> > >> > User 1 - NextVal gets 100
> > >> > User 2 - NextVal gets 101
> > >> > User 1 - CurrVal gets 100 or 101?
> > >> >
> > >> > I.e. is Oracle smart enough to keep a different CURRVAL for
> > >> > each user?
> > >
> > >Good advise. But consider this ... what happens to a variable in a procedure
> > >or package if more than one user is executing it at the same time? What
> > >happens to the results of a SELECT statement if two users are executing it
> > >at the same time?
> > >
> > >I think the answer to your question is obvious if you give it some thought.
> > >
> > >Daniel Morgan
> > >

With exception of the political party thing, I've not much use for either or all of them, I absolutely agree.

I am far more enthusiastic about helping people when them truly demonstrate that they put in some effort themselves. I want to see basic information provided when it is relevant like platform, operating system, Oracle version, optimizer, etc. I would like to see the phrases like "I did this explain plan and I don't understand how to use it to figure out why my system is slow" rather than the usual "I've got a really slow query can someone help me."

Thomas is correct ... it is not smugness ... it is a willingness to put in more effort to help those who have put in more effort and need a little guidance.

Daniel Morgan Received on Thu Jun 06 2002 - 15:24:20 CDT

Original text of this message

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