skip to main content
Designing and coding the IP : Optimization : Advanced optimization
 

Advanced optimization

Most IPs can be implemented by using the Default and Column Specific Restriction optimization. There are cases where using the Default and the techniques discussed in this section can lead to a more optimized implementation.
Use advanced optimization if your data source has an expression evaluator, possibly with its own syntax. For example, your data source may support functions that allow you to execute an expression on a set of columns and to return a result set. In this case, you can use dam_getSetOfConditionListsEx to retrieve all or part of the WHERE clause as a set of condition lists and convert each condition list into the expression format supported by your data source. The format in which the WHERE clause is returned by the OpenAccess SDK SQL engine is based on the value returned by the IP for option IP_SUPPORT_UNION_CONDLIST. The values are:
If Option Value = 0, the IP can call to get the WHERE expressions as SQL_SET_CONDLIST_INTERSECT ( AND condition lists).
If Option Value = 1, the IP can call to get the WHERE expressions as SQL_SET_CONDLIST_UNION ( OR condition lists).
Note: If you decide to operate in this mode, you must turn off the default index optimization by calling dam_setOption(DAM_CONN_OPTION, dam_hdbc, DAM_CONN_OPTION_INDEX_OPTIMIZATION, DAM_INDEX_IGNORE_ALL) in the CONNECT function of your IP.