Considerations For Set Transaction - HP Neoview SQL Reference Manual

Hide thumbs Also See for Neoview SQL:
Table of Contents

Advertisement

autobegin-option
specifies whether transactions should be initiated automatically.
The default setting is ON.
If this option is set to OFF and Neoview SQL needs a transaction and one is not already
running, an error is returned.
The AUTOBEGIN option in a SET TRANSACTION can only be specified on one SET
TRANSACTION command. This means that you can only issue the SET TRANSACTION
AUTOBEGIN OFF statement by itself. It cannot be combined with other functions of SET
TRANSACTION. For example, you cannot issue SET TRANSACTION AUTOBEGIN OFF,
NO ROLLBACK OFF.
SET TRANSACTION AUTOBEGIN and SET TRANSACTION AUTOCOMMIT are
independent of each other; one does not affect the other.
multicommit-option
The default value is OFF.
All subsequent delete queries use multiple transactions to complete the operation until
MULTI COMMIT is set to OFF by another SET TRANSACTION statement. These multiple
transactions are managed by the system. These multiple transactions are independent
transactions from TMF. Therefore, any point-in-time recovery by TMF is done individually
for these multiple transactions. MULTI COMMIT can be specified in the SET
TRANSACTION statement along with other transaction-mode options. This option
is not compatible with the READ UNCOMMITTED access option or with READ ONLY
access mode or with the NO ROLLBACK option set to ON. The SET TRANSACTION
options, except MULTI COMMIT, are valid for each of the transactions the system starts
to complete the statement. This option cannot be used under a user-defined transaction.
This feature is also known as Long Running Delete. For more information, see
Running Delete " (page
NOTE:
multicommit-option on small tables incurs unnecessary overhead from starting and
committing multiple transactions.
When MULTI COMMIT is set to ON, all subsequent delete queries use multiple
transactions to complete the operation until MULTI COMMIT is set to OFF by another
SET TRANSACTION statement.

Considerations for SET TRANSACTION

MULTI COMMIT
Delete operations on a very large data set (the number of rows affected in a single table in a
single transaction) can be long running. This causes the row locks to escalate to table locks
resulting in loss of concurrency. The Long Running Delete (LRD) feature executes these delete
statements in multiple statements. Each of these multiple statements is executed in a separate
transaction, thus avoiding lock escalation.
LRD is turned on by setting the MULTI COMMIT option ON. For example:
SET TRANSACTION MULTI COMMIT ON;
DELETE FROM persnl.employee
WHERE empnum = 23;
--- 1 row(s) deleted.
SET TRANSACTION MULTI COMMIT OFF;
190
SQL Statements
110).
The multicommit-option must only be used for large tables. Using the
"Long

Advertisement

Table of Contents
loading

Table of Contents