In SQL, you may need to control the rollback segment used as the default rollback segment may be too small for the required transaction, or you may want to ensure that your transaction runs in a special rollback segment, unaffected by others. The statement is as follows:
SET TRANSACTION USE ROLLBACK SEGMENT segment_name;
On a related note, if all you are doing are SELECTS, it is worth telling the database of this using the following:
SET TRANSACTION READ ONLY;
Both these statements must be the first statement of the transaction.
No comments:
Post a Comment