create table tcur ( x number primary key ) ; insert into tcur select rownum x from all_objects where rownum < 1000; analyze table tcur compute statistics; create or replace procedure imp_test is y number; begin for i in 1 .. 50 loop for j in 1 .. 999 loop select x into y from tcur where x = j; end loop; end loop; end; / create or replace procedure exp_test is cursor c(p number) is select x from tcur where x = p; y number; begin for i in 1 .. 50 loop for j in 1 .. 999 loop open c(j); fetch c into y; close c; end loop; end loop; end; / set timing on alter system flush buffer_cache; alter system flush shared_pool; exec imp_test alter system flush buffer_cache; alter system flush shared_pool; exec exp_test