Student Reviews
( 5 Of 5 )
1 review
Video of 78/125 Oracle PLSQL: Design consideration / NOCOPY Hint 2 in Oracle PL/SQL course by khaled alkhudari channel, video No. 78 free certified online
Learn Oracle PLSQL
EXAM 1Z0-144
------------------------------------------------------
create or replace package nocopy_test
is
type number_t is table of varchar2(32767) index by binary_integer;
procedure pass_by_vale(nums in out number_t);
procedure pass_by_refernce(nums in out nocopy number_t);
procedure init;
end;
-------------------------------------------------------------------------
create or replace package body nocopy_test
is
l_numbers number_t;
c_array_size number:1000000;
c_it number:20;
procedure pass_by_vale(nums in out number_t)
is
indx pls_integer;
begin
indx:nums.count;
end;
procedure pass_by_refernce(nums in out nocopy number_t)
is
indx pls_integer;
begin
indx:nums.count;
end;
procedure init
is
begin
l_numbers.delete;
for i in 1c_array_size
loop
l_numbers(i):'s' i;
end loop;
dbms_output.put_line('start ' to_char(sysdate,'hh:mi:ss') );
for i in 11000
loop
pass_by_vale(l_numbers);
end loop;
dbms_output.put_line('end ' to_char(sysdate,'hh:mi:ss') );
dbms_output.put_line('start ' to_char(sysdate,'hh:mi:ss'));
for i in 11000
loop
pass_by_refernce(l_numbers);
end loop;
dbms_output.put_line('end ' to_char(sysdate,'hh:mi:ss'));
end;
end;
-----------------------------------------
begin
nocopy_test.init;
end;