skip to main content
Designing and coding the IP : Optimization : Default optimization : Turning off default optimization
 

Turning off default optimization

When using the advanced optimization, the IP must prevent the SQL engine from performing the default optimization of finding the best index column. This is required because the default optimization process can result in the transformation of the original query into a form that is not optimal for advanced optimization. For example, a query with an OR condition on two different indexed columns would be split into two separate queries by the default optimizer. Turn off the default optimization by using the following call:
dam_setOption(DAM_CONN_OPTION, dam_hdbc, DAM_CONN_OPTION_INDEX_OPTIMIZATION, DAM_INDEX_IGNORE_ALL)