Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Questioning Oracle Documentation
"Jonathan Lewis" <jonathan_at_jlcomp.demon.co.uk> a écrit dans le message de
news:ccr3ht$l16$1_at_sparta.btinternet.com...
>
> This didn't reproduce on my 9.2.0.1.
>
> null operation: 174
> simple assignment 337
> double conversion 707
>
>
>
> --
> Regards
>
> Jonathan Lewis
>
It seems that my other didn't reach the group. I repost it, sorry if it's double.
I executed the following test with versions 8.1.7.4 and 9.2.0.4 on a WinNT4SP6 box:
9.2.0.4:
n+15 -> 295 n+15.0 -> 227 c5=15 -> 732 c5=TO_CHAR -> 704 c5='15' -> 2929 c2='15' -> 2744 vc='15' -> 2749
n+15 -> 292 n+15.0 -> 214 c5=15 -> 727 c5=TO_CHAR -> 718 c5='15' -> 2930 c2='15' -> 2829 vc='15' -> 2764
n+15 -> 288 n+15.0 -> 213 c5=15 -> 737 c5=TO_CHAR -> 705 c5='15' -> 2959 c2='15' -> 2750 vc='15' -> 2751
8.1.7.4:
n+15 -> 309 n+15.0 -> 255 c5=15 -> 747 c5=TO_CHAR -> 1048 c5='15' -> 2610 c2='15' -> 2405 vc='15' -> 2388
n+15 -> 303 n+15.0 -> 252 c5=15 -> 741 c5=TO_CHAR -> 1041 c5='15' -> 2618 c2='15' -> 3305 vc='15' -> 2400
n+15 -> 305 n+15.0 -> 248 c5=15 -> 750 c5=TO_CHAR -> 1038 c5='15' -> 2615 c2='15' -> 2409 vc='15' -> 2404
The test case was:
DECLARE
c5 CHAR(5);
i PLS_INTEGER; j PLS_INTEGER; n NUMBER := 0;
BEGIN
BEGIN
i := dbms_utility.get_time();
FOR i IN 1 .. 1000000 LOOP n := n + 15; END LOOP; j := dbms_utility.get_time() - i; dbms_output.put_line('n+15 ->' || TO_CHAR(j,'9999'));END; BEGIN
FOR i IN 1 .. 1000000 LOOP n := n+15.0; END LOOP; j := dbms_utility.get_time() - i; dbms_output.put_line('n+15.0 ->' || TO_CHAR(j,'9999'));END; BEGIN
FOR i IN 1 .. 1000000 LOOP c5 := 15; END LOOP; j := dbms_utility.get_time() - i; dbms_output.put_line('c5=15 ->' || TO_CHAR(j,'9999'));END; BEGIN
FOR i IN 1 .. 1000000 LOOP c5 := TO_CHAR(15); END LOOP; j := dbms_utility.get_time() - i; dbms_output.put_line('c5=TO_CHAR ->' || TO_CHAR(j,'9999'));END; BEGIN
FOR i IN 1 .. 10000000 LOOP c5 := '15'; END LOOP; j := dbms_utility.get_time() - i; dbms_output.put_line('c5=''15'' ->' || TO_CHAR(j,'9999'));END; BEGIN
FOR i IN 1 .. 10000000 LOOP c2 := '15'; END LOOP; j := dbms_utility.get_time() - i; dbms_output.put_line('c2=''15'' ->' || TO_CHAR(j,'9999'));END; BEGIN
FOR i IN 1 .. 10000000 LOOP vc := '15'; END LOOP; j := dbms_utility.get_time() - i; dbms_output.put_line('vc=''15'' ->' || TO_CHAR(j,'9999'));END; BEGIN
FOR i IN 1 .. 1000000 LOOP c5 := TO_CHAR(TO_NUMBER('15')); END LOOP; j := dbms_utility.get_time() - i; dbms_output.put_line('c5=TO_CHAR(TO_NUMBER(''15'')) ->' || TO_CHAR(j,'9999'));END; END;
-- Regards Michel CadotReceived on Sun Jul 11 2004 - 08:53:20 CDT