ttOptShowJoinOrder

This procedure returns the join order of the last prepared or run SQL statement (SELECT, UPDATE, DELETE, and INSERT SELECT) in the current transaction. For a join order to be collected, use ttOptSetFlag ('ShowJoinOrder', 1) or set the ttIsql ShowJoinOrder command to ON (1) first in the same transaction. AUTOCOMMIT must be off when using either of these commands. The join order is represented by the order of the table names.

Required Privilege

This procedure requires no 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 locally on the element from which it is called.

Related Views

This procedure has these related views.

SYS.GV$OPT_JOIN_ORDER

SYS.V$OPT_JOIN_ORDER

Syntax

ttOptShowJoinOrder()

Parameters

ttOptShowJoinOrder has no parameters.

Result Set

ttOptShowJoinOrder returns the result:

Column Type Description

joinOrder

TT VARCHAR (4096) NOT NULL

Table names, including owner name quantifiers and correlation name for each table if specified. Table names are returned in parentheses.

Using a synonym to specify a table name is not supported.

Examples

Command> AUTOCOMMIT 0;
         CALL ttOptSetFlag ('ShowJoinOrder', 1);
         PREPARE SELECT * FROM t1;
         CALL ttOptShowJoinOrder();
         ( T1 )

Notes

  • You must call ttOptSetFlag ('ShowJoinOrder', 1) or set the ttIsql ShowJoinOrder command to ON (1) before using this procedure.

  • This procedure works within one transaction and is not persistent across transactions.