what did you use to test with -- different environments will return radically different results -- especially if you use PLSQL for this sort of stuff with its magical cursor caching and such.
But, here was my example:
ops$tkyte@ORA10G> create or replace procedure p
2 authid current_user
3 as
4 l_ns varchar2(4000);
5 l_gets number;
6 l_gethits number;
7 l_pins number;
8 l_pinhits number;
9 l_sgets number;
10 l_sgethits number;
11 l_spins number;
12 l_spinhits number;
13 begin
14 for i in 1 .. 1000
15 loop
16 execute immediate
17 'select namespace, gets, gethits, pins, pinhits
18 from v$librarycache
19 where namespace = ''SQL AREA'' '
20 into l_ns, l_gets, l_gethits, l_pins, l_pinhits;
21
22 if ( i in (1,1000) )
23 then
24 if ( i = 1 )
25 then
26 l_sgets := l_gets; l_sgethits := l_gethits;
27 l_spins := l_pins; l_spinhits := l_pinhits;
28 end if;
29 dbms_output.put_line
30 ( l_ns || to_char(l_gets,'999,999') ||
31 to_char(l_gethits,'999,999') ||
32 to_char(l_pins,'999,999') ||
33 to_char(l_pinhits,'999,999') );
34 if ( i = 1000 )
35 then
36 dbms_output.put_line
37 ( l_ns || to_char(l_gets-l_sgets,'999,999') ||
38 to_char(l_gethits-l_sgethits,'999,999') ||
39 to_char(l_pins-l_spins,'999,999') ||
40 to_char(l_pinhits-l_spinhits,'999,999') );
41 end if;
42 end if;
43 end loop;
44 end;
45 /
Procedure created.
ops$tkyte@ORA10G> @connect "/ as sysdba"
ops$tkyte@ORA10G> set termout off
sys@ORA10G> @login
sys@ORA10G> set termout off
sys@ORA10G> REM GET afiedt.buf NOLIST
sys@ORA10G> set termout on
sys@ORA10G> alter system set session_cached_cursors=0 scope=spfile;
System altered.
sys@ORA10G> alter system set cursor_space_for_time=FALSE scope=spfile;
System altered.
sys@ORA10G> startup force
ORACLE instance started.
Total System Global Area 171966464 bytes
Fixed Size 777956 bytes
Variable Size 145760540 bytes
Database Buffers 25165824 bytes
Redo Buffers 262144 bytes
Database mounted.
Database opened.
sys@ORA10G> @connect /
sys@ORA10G> set termout off
ops$tkyte@ORA10G> @login
ops$tkyte@ORA10G> set termout off
ops$tkyte@ORA10G> REM GET afiedt.buf NOLIST
ops$tkyte@ORA10G> set termout on
ops$tkyte@ORA10G> exec p
SQL AREA 1,860 1,536 6,740 6,122
SQL AREA 1,864 1,540 7,751 7,133
SQL AREA 4 4 1,011 1,011
PL/SQL procedure successfully completed.
ops$tkyte@ORA10G> exec p
SQL AREA 1,866 1,542 7,756 7,138
SQL AREA 1,866 1,542 8,755 8,137
SQL AREA 0 0 999 999
PL/SQL procedure successfully completed.
ops$tkyte@ORA10G> exec p
SQL AREA 1,868 1,544 8,760 8,142
SQL AREA 1,868 1,544 9,759 9,141
SQL AREA 0 0 999 999
PL/SQL procedure successfully completed.
ops$tkyte@ORA10G> @connect "/ as sysdba"
ops$tkyte@ORA10G> set termout off
sys@ORA10G> @login
sys@ORA10G> set termout off
sys@ORA10G> REM GET afiedt.buf NOLIST
sys@ORA10G> set termout on
sys@ORA10G> alter system set session_cached_cursors=100 scope=spfile;
System altered.
sys@ORA10G> alter system set cursor_space_for_time=FALSE scope=spfile;
System altered.
sys@ORA10G> startup force
ORACLE instance started.
Total System Global Area 171966464 bytes
Fixed Size 777956 bytes
Variable Size 145760540 bytes
Database Buffers 25165824 bytes
Redo Buffers 262144 bytes
Database mounted.
Database opened.
sys@ORA10G> @connect /
sys@ORA10G> set termout off
ops$tkyte@ORA10G> @login
ops$tkyte@ORA10G> set termout off
ops$tkyte@ORA10G> REM GET afiedt.buf NOLIST
ops$tkyte@ORA10G> set termout on
ops$tkyte@ORA10G> exec p
SQL AREA 637 313 5,513 4,903
SQL AREA 637 313 6,520 5,910
SQL AREA 0 0 1,007 1,007
PL/SQL procedure successfully completed.
ops$tkyte@ORA10G> exec p
SQL AREA 638 314 6,525 5,915
SQL AREA 638 314 7,524 6,914
SQL AREA 0 0 999 999
PL/SQL procedure successfully completed.
ops$tkyte@ORA10G> exec p
SQL AREA 639 315 7,529 6,919
SQL AREA 639 315 8,528 7,918
SQL AREA 0 0 999 999
PL/SQL procedure successfully completed.
ops$tkyte@ORA10G> @connect "/ as sysdba"
ops$tkyte@ORA10G> set termout off
sys@ORA10G> @login
sys@ORA10G> set termout off
sys@ORA10G> REM GET afiedt.buf NOLIST
sys@ORA10G> set termout on
sys@ORA10G> alter system set session_cached_cursors=100 scope=spfile;
System altered.
sys@ORA10G> alter system set cursor_space_for_time=TRUE scope=spfile;
System altered.
sys@ORA10G> startup force
ORACLE instance started.
Total System Global Area 171966464 bytes
Fixed Size 777956 bytes
Variable Size 145760540 bytes
Database Buffers 25165824 bytes
Redo Buffers 262144 bytes
Database mounted.
Database opened.
sys@ORA10G> @connect /
sys@ORA10G> set termout off
ops$tkyte@ORA10G> @login
ops$tkyte@ORA10G> set termout off
ops$tkyte@ORA10G> REM GET afiedt.buf NOLIST
ops$tkyte@ORA10G> set termout on
ops$tkyte@ORA10G> exec p
SQL AREA 1,121 364 4,507 3,871
SQL AREA 1,180 372 4,824 4,167
SQL AREA 59 8 317 296
PL/SQL procedure successfully completed.
ops$tkyte@ORA10G> exec p
SQL AREA 1,181 373 4,828 4,171
SQL AREA 1,181 373 4,828 4,171
SQL AREA 0 0 0 0
PL/SQL procedure successfully completed.
ops$tkyte@ORA10G> exec p
SQL AREA 1,182 374 4,832 4,175
SQL AREA 1,182 374 4,832 4,175
SQL AREA 0 0 0 0
PL/SQL procedure successfully completed.
(which actually shows that 10g is doing a bit more than 9i was since...)
sys@ORA9IR2> alter system set session_cached_cursors=0 scope=spfile;
System altered.
sys@ORA9IR2> alter system set cursor_space_for_time=FALSE scope=spfile;
System altered.
sys@ORA9IR2> startup force
ORACLE instance started.
Total System Global Area 236000356 bytes
Fixed Size 451684 bytes
Variable Size 167772160 bytes
Database Buffers 67108864 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
sys@ORA9IR2> @connect /
sys@ORA9IR2> set termout off
ops$tkyte@ORA9IR2> REM GET afiedt.buf NOLIST
ops$tkyte@ORA9IR2> set termout on
ops$tkyte@ORA9IR2> exec p
SQL AREA 1,145 977 4,884 4,579
SQL AREA 2,172 1,983 7,908 7,603
SQL AREA 1,027 1,006 3,024 3,024
PL/SQL procedure successfully completed.
ops$tkyte@ORA9IR2> exec p
SQL AREA 2,175 1,985 7,918 7,611
SQL AREA 3,174 2,984 10,915 10,608
SQL AREA 999 999 2,997 2,997
PL/SQL procedure successfully completed.
ops$tkyte@ORA9IR2> exec p
SQL AREA 3,177 2,987 10,924 10,617
SQL AREA 4,176 3,986 13,921 13,614
SQL AREA 999 999 2,997 2,997
PL/SQL procedure successfully completed.
ops$tkyte@ORA9IR2> @connect "/ as sysdba"
ops$tkyte@ORA9IR2> set termout off
sys@ORA9IR2> REM GET afiedt.buf NOLIST
sys@ORA9IR2> set termout on
sys@ORA9IR2> alter system set session_cached_cursors=100 scope=spfile;
System altered.
sys@ORA9IR2> alter system set cursor_space_for_time=FALSE scope=spfile;
System altered.
sys@ORA9IR2> startup force
ORACLE instance started.
Total System Global Area 236000356 bytes
Fixed Size 451684 bytes
Variable Size 167772160 bytes
Database Buffers 67108864 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
sys@ORA9IR2> @connect /
sys@ORA9IR2> set termout off
ops$tkyte@ORA9IR2> REM GET afiedt.buf NOLIST
ops$tkyte@ORA9IR2> set termout on
ops$tkyte@ORA9IR2> exec p
SQL AREA 461 293 4,195 3,895
SQL AREA 485 296 6,216 5,916
SQL AREA 24 3 2,021 2,021
PL/SQL procedure successfully completed.
ops$tkyte@ORA9IR2> exec p
SQL AREA 487 297 6,225 5,923
SQL AREA 487 297 8,223 7,921
SQL AREA 0 0 1,998 1,998
PL/SQL procedure successfully completed.
ops$tkyte@ORA9IR2> exec p
SQL AREA 489 299 8,231 7,929
SQL AREA 489 299 10,229 9,927
SQL AREA 0 0 1,998 1,998
PL/SQL procedure successfully completed.
ops$tkyte@ORA9IR2> @connect "/ as sysdba"
ops$tkyte@ORA9IR2> set termout off
sys@ORA9IR2> REM GET afiedt.buf NOLIST
sys@ORA9IR2> set termout on
sys@ORA9IR2> alter system set session_cached_cursors=100 scope=spfile;
System altered.
sys@ORA9IR2> alter system set cursor_space_for_time=TRUE scope=spfile;
System altered.
sys@ORA9IR2> startup force
ORACLE instance started.
Total System Global Area 236000356 bytes
Fixed Size 451684 bytes
Variable Size 167772160 bytes
Database Buffers 67108864 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
sys@ORA9IR2> @connect /
sys@ORA9IR2> set termout off
ops$tkyte@ORA9IR2> REM GET afiedt.buf NOLIST
ops$tkyte@ORA9IR2> set termout on
ops$tkyte@ORA9IR2> exec p
SQL AREA 471 303 2,736 2,435
SQL AREA 495 306 3,751 3,450
SQL AREA 24 3 1,015 1,015
PL/SQL procedure successfully completed.
ops$tkyte@ORA9IR2> exec p
SQL AREA 497 307 3,757 3,454
SQL AREA 497 307 4,756 4,453
SQL AREA 0 0 999 999
PL/SQL procedure successfully completed.
ops$tkyte@ORA9IR2> exec p
SQL AREA 499 309 4,761 4,458
SQL AREA 499 309 5,760 5,457
SQL AREA 0 0 999 999
PL/SQL procedure successfully completed.