2 Replies Latest reply: Sep 26, 2013 4:59 AM by sybrand_b RSS

    update statement takes much time.suggestion required

    supersen

      Hi guys,

      following update statement takes much time to process.  Can anyone come across this simple update statmenet and comback with any suggestions at first

       

      UPDATE CONSUMER CS

      SET CS.CONSUMER_ID= ( SELECT CONSUMER_ID FROM STG_CONSUMER STG

      WHERE STG.VALUEID=CS.VALUEID)

      WHERE CS.VALUE_CODE IN ('58')

      AND EXISTS

      (SELECT STG.VALUEID

      FROM STG_CONSUMER STG

      WHERE STG.VALUEID=CS.VALUEID

      AND CS.VALUE_CODE IN ('58')

      );

       

      Please comeout with suggestions that you find any mistakes functionally in the query

       

      S