OptimizerHint

The OptimizerHint connection attribute establishes the connection's optimizer hint defaults.

They can be different than the system defaults. The optimizer hints set with this connection attribute are set for every SQL statement in the user application.

The value of this attribute is a string of the same format as the statement level optimizer hints, but without the delimiters *+, */ and -+. The string can only contain the optimizer hint names. It cannot be mixed with other hint strings or comments.

The order of precedence for optimizer hints is statement level hints, transaction level hints and lastly hints set by this connection attribute.

For client/server applications, the attribute set by the client connection takes precedence over server DSN settings of this attribute.

Some symbols, such as semi-colons (;) are not accepted in attribute values. For hints where the parameter might contain a semi-colon, multiple hints of the same name are combined into one hint. For example, to express:

TT_INDEX (t1,i1, 0; t2, i2,0)

use

TT_INDEX (t1,i1,0) TT_INDEX (t2, i2,0 )

To combine multiple hints at the connection level, you must enter them in the same line.

For a list of optimizer hints supported as values to this attribute, see Statement Level Optimizer Hints in the Oracle TimesTen In-Memory Database SQL Reference.

Required Privilege

No privilege is required to change the value of this attribute.

Usage in TimesTen Scaleout and TimesTen Classic

This attribute is supported in both TimesTen Classic and TimesTen Scaleout.

Setting

Set OptimizerHint as follows:

Where to set the attribute How the attribute is represented Setting

C or Java programs or UNIX and Linux systems odbc.ini file in TimesTen Classic or in the database definition (.dbdef) file in TimesTen Scaleout

OptimizerHint

A string specifying optimizer hints and their values. The maximum length of the string is 512.

Windows ODBC Data Source Administrator

Not applicable