ROLLBACK vs COMMIT when nothing done
Posted in 1994
Stuart Kemp — — source: Informix-list mailing list archive (1991-1998)
Given the situation where you BEGIN WORK and shortly thereafter you want to end the transaction *but nothing has been altered*, WRT efficiency is it better to COMMIT or ROLLBACK? e.g. FUNCTION xyz() BEGIN WORK IF (NOT LockSomeRecord()) -- Failed ROLLBACK WORK -- Better to COMMIT? RETURN END IF ... COMMIT WORK END FUNCTION where LockSomeRecord declares a cursor for update, and fetch's the row -SRK -- Dept of Computer Science Internet: stuart@cs.jcu.edu.au James Cook University Townsville Tel: +61 77 814992 Qld 4811 Australia FAX: +61 77 814029