SQL Performance (MOSC)

MOSC Banner

Optimize update statement

edited Aug 23, 2013 3:33AM in SQL Performance (MOSC) 11 commentsAnswered
Hi All,
how can I optimize the below update statement?

declare

  cursor c_temp_item_loc_soh is
    select TILS.ITEM,
           TILS.LOC_TYPE,
           TILS.LOC,
           TILS.FIRST_SOLD,
           TILS.LAST_SOLD,
           TILS.FIRST_RECEIVED,
           TILS.LAST_RECEIVED
      from temp_item_loc_soh tils
     where exists ( select 1
                      from item_loc_soh ils
                     where ils.item = tils.item
                  );
 
  cpt integer := 0;     
     
begin
      
  for rec_temp_item_loc_soh in c_temp_item_loc_soh
  loop
    if rec_temp_item_loc_soh.loc_type = 'S' then
   
       update item_loc_soh
          set first_sold = to_date(rec_temp_item_loc_soh.first_sold,'YYYYMMDD'),

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