You can add hints to the source SQL query to pass instructions to a database optimizer. The optimizer uses the hints to choose a query run plan to access the source.
The Hints field appears in the
Query
view of a relational data object instance or a customized data object. The source database must be Oracle, Sybase, IBM DB2, or Microsoft SQL Server. The Hints field does not appear for other database types.
When the Data Integration Service generates the source query, it adds the SQL hints to the query exactly as you enter them in the Developer tool. The Data Integration Service does not parse the hints. When you run the mapping that contains the source, the mapping log shows the query with the hints in the query.
The Data Integration Service inserts the SQL hints in a position in the query depending on the database type. Refer to your database documentation for information about the syntax for hints.
Oracle
The Data Integration Service add hints directly after the SELECT/UPDATE/INSERT/DELETE keyword.
SELECT /*+ <hints> */ FROM …
The '+' indicates the start of hints.
The hints are contained in a comment (/* ... */ or --... until end of line)
Sybase
The Data Integration Service adds hints after the query. Configure a plan name in the hint.
SELECT … PLAN <plan>
select avg(price) from titles plan "(scalar_agg (i_scan type_price_ix titles )"
IBM DB2
You can enter the optimize-for clause as a hint. The Data Integration Service adds the clause at the end of the query.
SELECT … OPTIMIZE FOR <n> ROWS
The optimize-for clause tells the database optimizer how many rows the query might process. The clause does not limit the number of rows. If the database processes more than <n> rows, then performance might decrease.
Microsoft SQL Server
The Data Integration Service adds hints at the end of the query as part of an OPTION clause.