PL/SQL (MOSC)

MOSC Banner

performance drag because of context switching

edited Jun 21, 2018 11:57AM in PL/SQL (MOSC) 5 commentsAnswered
 I need some ideas on how to boost the performance of one procedure. The procedure works like this:
create or replace procedure proc123 is
-- define cursor and type
cursor c1 is select columnA from tableA;
type p_array is table of tableB.columnA%type index by pls_integer;
v_array p_array;

-- some variables

begin
   open c1;
   loop
      fetch c1 bulk collect into v_array limit 1000;
         exit when v_array.count = 0;
         for i in v_array.first..v_array.last loop
            -- some manipulation and data processing
            insert into global_temp_table
            values(a, b);
         end loop;
   end loop;

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center