## Using PL/SQL to speed up long running update staements.

   UPDATE ACCOUNT_TOTALS  A 
   SET    CURRENT_EXP = CURRENT_EXP + ( SELECT DAILY_EXP
                                        FROM   TRANSACTION T
                                        WHERE  T.ACC_NO = A.ACC_NO )
   WHERE  EXISTS      ( SELECT 'X'
                        FROM   TRANSACTION T
                        WHERE  T.ACC_NO = A.ACC_NO );


## You can use PL/SQL to achieve the same result:

    DECLARE
      CURSOR READ_TRAN  IS
      SELECT ACC_NO, DAILY_EXP
      FROM TRANSACTION;
      --
      ACC_NO_STORE  NUMBER (6);
      DAILY_EXP_STORE   NUMBER (9,2);
    BEGIN
      OPEN READ_TRAN;
      LOOP;
        FETCH READ_TRAN INTO ACC_NO_STORE, DAILY_EXP_STORE; 
        EXIT WHEN READ_TRAN%NOTFOUND;
        --
        UPDATE ACCOUNT_TOTALS A 
        SET    CURRENT_EXP = CURRENT_EXP + DAILY_EXP_STORE
        WHERE  ACC_NO      = ACC_NO_STORE ;
      END LOOP;
      CLOSE READ_TRAN;
    END;
