ttDBWriteConcurrencyModeSet

The ttDBWriteConcurrencyModeSet built-in enables control over read optimization during periods of concurrent write operations.

Set the mode to one (1) to enable the enhanced write concurrency mode and disable read optimization. Set the mode to zero (0) to disable the enhanced write concurrency mode and re-enable read optimization.When the mode is set to one (1), all transaction and statement table lock hints are suppressed. This affects hint-triggered Sn table locks for SELECT statements and subqueries and also hint-triggered W table locks for DML statements. Suppression of the table lock hint also suppresses other table-lock hint driven execution plans such as star joins. Regardless of the mode setting, table locks that are not triggered by table-lock hints are not affected.

Required Privilege

This procedure requires ADMIN privilege.

Usage in TimesTen Scaleout and TimesTen Classic

This procedure is supported in TimesTen Classic.

TimesTen Scaleout applications can call this built-in procedure.

In TimesTen Scaleout, this procedure runs on all elements in the grid.

Related Views

This procedure has no related views.

Syntax

ttDBWriteConcurrencyModeSet(mode, wait)

Parameters

ttDBWriteConcurrencyModeSet has these parameters:

Parameter Type Description

mode

TT_INTEGER NOT NULL

The write concurrency mode:

0 - Optimize according to hints and standard optimization techniques.

1 - Optimize for concurrent write operations.

wait

TT_INTEGER NOT NULL

0 - Return immediately after starting mode transition.

1 - Wait until mode transition is complete before returning. This can be useful when setting the mode to a nonzero value. When setting the mode to zero, it is typically not necessary to specify wait to 1.

Result Set

ttDBWriteConcurrencyModeSet returns no result set:

Examples

The following example shows how to enable standard optimization techniques and return immediately after starting the operation:

CALL ttDBWriteConcurrencyModeSet(0,0);

Note:

When the mode is set to one (1), all transaction and statement table lock hints are suppressed. This affects hint-triggered Sn table locks for SELECT statements and subqueries and also hint-triggered W table locks for DML statements. Suppression of the table lock hint also suppresses other table-lock hint driven execution plans such as star joins. Regardless of the mode setting, table locks that are not triggered by table-lock hints are not affected.