How Hints Can Influence an Execution Plan
You can apply hints to pass instructions to the TimesTen query optimizer. The optimizer considers these hints when choosing the best execution plan for your query.
Transaction level hints are in effect for all calls to the ODBC
SQLPrepare function or JDBC PreparedStatement
objects in the transaction.
-
If a command is prepared with certain hints in effect, those hints continue to apply if the command is re-prepared automatically, even when this happens outside the initial prepare transaction. This can happen when a table is altered, or an index is dropped or created, or when statistics are modified, as described in Using the Query Optimizer to Choose Optimal Plan.
-
If a command is prepared without hints, subsequent hints do not affect the command if it is re-prepared automatically. An application must call the ODBC
SQLPreparefunction or JDBCConnection.prepareStatement()method a second time so that hints have an effect.