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

Home -> Community -> Usenet -> c.d.o.server -> Re: PL/SQL table next function, Oracle 7 vs Oracle 8

Re: PL/SQL table next function, Oracle 7 vs Oracle 8

From: Francis Small <fthes_at_sr.hp.com>
Date: 7 May 1999 23:42:32 GMT
Message-ID: <7gvtp8$2id@canyon.sr.hp.com>


I seem to have found the source of my problem, and can re-create it using the script below:

declare
  type debug_tabtype is table of number     index by binary_integer;
  debug_tab debug_tabtype;
  rec_id integer;
begin
  debug_tab(1) := 1;
  debug_tab(&1) := 1;
  rec_id := debug_tab.first;
  while rec_id is not null
  loop
    dbms_output.put_line(rec_id);
    debug_tab.delete(rec_id);
    rec_id := debug_tab.next(rec_id);
  end loop;
end;
/

This creates a table at index 1 and &1 (call it N). It goes to the first entry, deletes it, then executes the next function. On Oracle 8, the wait is proportional to the value of N. For a value of 10 million, the wait was about 10 seconds. In my application, 'N' can be about 1 billion, corresponding to a wait of 16 minutes. On Oracle 7, the delay is apparently instantaneous for a value of 1 billion for N. Is this some sort of "enhancement" for Oracle 8???

  Francis

--
. . .|. . 5 . . . . 10. . . . 15. . . . 20. . . . 25. . . . 30. . . . 35. . .

Giants                                         Francis Small - M/S M1RA     
 Bums                                            Test Engineering
    Diamondbacks                                   Microwave Instruments Div.
       Rockies                                       telnet 794-3305
            Padres                                     fthes_at_sr.hp.com
*********************** National League West Standings ***********************
Received on Fri May 07 1999 - 18:42:32 CDT

Original text of this message

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