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: Locked multiple sequencer hits.

Re: Locked multiple sequencer hits.

From: Steven Weintraub <stevenw_at_fchoice.com>
Date: Tue, 19 Oct 1999 13:01:38 -0500
Message-ID: <380CB202.E0978E99@fchoice.com>


pancho wrote:
>
> OK, steve I read your other post too. Interesting requirements. Given
> the situation you describe, At the beginning of your procedure, place a
> For loop to execute 1,549,326 times. Put your nextval statement in it
> but save only the first and last values to variables. You now have
> your range of contiguous numbers. Put together your insert statements
> using offsets into your range of numbers. I wonder though if you are
> using the sequence correctly and/or you may want to revist your
> database design.

As I said - I'd rather not have to do this many nextval calls. Also, there is a problem - I can not guarantee that the numbers are sequential by this method. Someone else can get in and make a sequencer call at the same time. I could lock them out - but then with this many calls - they might time-out and fail waiting for me. Not a good alternative, particularly since this probably an active database where there might be 100's of end users needing to enter and manipulate data at the same time. (BTW the number I cite is just illustrative - I have run tests up to 4,000,000 objects and expect the end user to do more than that).

This method of course occured to me (its the obvious method) - but has the two problems I mentioned. Its slow and it does not guarantee sequentially - thus doesn't solve all the problems. I'm vying with my manager to force the end user to have privilege to alter the sequences, but he wants me to find out if there is an other way to do this first.

And I should add I can not redesign the database. We are writing data import/export utility for an existing widely used database application product - and must live in constraints of that product's design.


                   enough from this mooncalf - Steven


Steven Ross Weintraub                        | 
First Choice Software                        | O Lord, 
4412 Spicewood Springs Rd. Suite 701         |    let me talk gently, 
Austin, Texas 78759                          | for I might have to eat 
Phone: 512-418-2905 x100   Fax: 512-418-2983 |   my words tomorrow. 
external Email: stevenw_at_fchoice.com          | 
-----------------------------------------------------------------------
          The unexamined life is not worth living - Socrates
          The unlived life is not worth examining - Weintraub
-----------------------------------------------------------------------
Received on Tue Oct 19 1999 - 13:01:38 CDT

Original text of this message

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