Why function mappings are important

Function mappings are one of several important inputs to the pushdown analysis performed by the query optimizer.

In deciding on the best query access plan, the query optimizer factors the capabilities of the data source to perform a particular type of SQL function or operation. If the function does not have a mapping, the function will not be sent to the data source for processing. Functions and other operations that can be pushed down to the data source improve performance.

If the data source has a similar function to a database function, but it returns slightly different results, creating a function mapping might improve performance. For example, the Informix® STDEV (standard deviation) function produces different results than the Db2® STDDEV function for some sets of input data. For this reason the Informix wrapper does not have a default mapping between these two functions. If you do not care about the result set differences, you might improve the performance of queries that access Informix data sources and use the Db2 STDDEV function. By creating a function mapping between the Informix STDEV and the Db2 STDDEV function, you provide the query optimizer the choice of sending the processing of that function down to the data source.