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: Worst of the worst

Re: Worst of the worst

From: Daniel Morgan <damorgan_at_exxesolutions.com>
Date: Tue, 27 May 2003 11:30:31 -0700
Message-ID: <3ED3AEC7.CE5FF1F7@exxesolutions.com>


Telemachus wrote:

> from the TOC :
>
> Primary Author: John Russell
>
> Contributing Author: Tom Portfolio
>
> Contributors: Shashaanka Agrawal, Cailein Barclay, Dmitri Bronnikov, Sharon
> Castledine, Thomas Chang, Ravindra Dani, Chandrasekharan Iyer, Susan
> Kotsovolos, Neil Le, Warren Li, Chris Racicot, Murali Vemulapati, Guhan
> Viswanathan, Minghui Yang
>
> "Daniel Morgan" <damorgan_at_exxesolutions.com> wrote in message
> news:3ED26387.74542B6C_at_exxesolutions.com...
> > I've seen bad documentation from time to time but here's an example from
> > Oracle that staggers me.
> >
> > SQL> GET test.sql
> > 1 DECLARE
> > 2 TYPE NumTab IS TABLE OF NUMBER(4) INDEX BY BINARY_INTEGER;
> > 3 TYPE NameTab IS TABLE OF CHAR(15) INDEX BY BINARY_INTEGER;
> > 4 pnums NumTab;
> > 5 pnames NameTab;
> > 6 t1 NUMBER(5);
> > 7 t2 NUMBER(5);
> > 8 t3 NUMBER(5);
> > 9
> > 10
> > 11 BEGIN
> > 12 FOR j IN 1..5000 LOOP -- load index-by tables
> > 13 pnums(j) := j;
> > 14 pnames(j) := 'Part No. ' || TO_CHAR(j);
> > 15 END LOOP;
> > 16 t1 := dbms_utility.get_time;
> > 17 FOR i IN 1..5000 LOOP -- use FOR loop
> > 18 INSERT INTO parts VALUES (pnums(i), pnames(i));
> > 19 END LOOP;
> > 20 t2 := dbms_utility.get_time;
> > 21 FORALL i IN 1..5000 -- use FORALL statement
> > 22 INSERT INTO parts VALUES (pnums(i), pnames(i));
> > 23 get_time(t3);
> > 24 dbms_output.put_line('Execution Time (secs)');
> > 25 dbms_output.put_line('---------------------');
> > 26 dbms_output.put_line('FOR loop: ' || TO_CHAR(t2 - t1));
> > 27 dbms_output.put_line('FORALL: ' || TO_CHAR(t3 - t2));
> > 28* END;
> > SQL> /
> > Execution Time (secs)
> > ---------------------
> > FOR loop: 32
> > FORALL: 3
> >
> > PL/SQL procedure successfully completed.
> >
> > Source:
> >
> http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96624/05_colls
> .htm#28087
> >
> > Take a good look at lines 16 and 20. Then look at line 23.
> >
> > Ok you lurkers from Oracle ... here's your chance to do a public service
> > ... find whoever managed to do this
> > and explain to them the concept of why documentation is posted.
> > Obviously the concept was completely lost
> > on several people.
> >
> > Thanks.
> > --
> > Daniel Morgan
> > http://www.outreach.washington.edu/extinfo/certprog/oad/oad_crs.asp
> > damorgan_at_x.washington.edu
> > (replace 'x' with a 'u' to reply)
> >
> >

Thanks. As a group they should all hang their heads in shame and be forced to repaint the bottom of one of Larry's boats. ;-)

Thanks to Mark Townsend this has been reported to the proper person(s) and I expect will be corrected as they seem to do a good job at cleaning things up when errors are pointed out.

--
Daniel Morgan
http://www.outreach.washington.edu/extinfo/certprog/oad/oad_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Tue May 27 2003 - 13:30:31 CDT

Original text of this message

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