|
The mi_funcarg_get_distrib() returns the distribution information for the column associated with the expensive-UDR argument of a cost or selectivity function.
The mi_funcarg_get_distrib() function returns the distribution information for the argument from the MI_FUNCARG structure that funcarg_ptr references. The MI_FUNCARG structure describes an argument of an expensive UDR to its cost or selectivity function. The distribution information is stored in the sysdistrib system catalog table. Use the mi_funcarg_get_distrib() function only for expensive-UDR arguments that are column values; that is, only arguments for which the mi_funcarg_get_argtype() function returns the MI_FUNCARG_COLUMN value.
Use the mi_funcarg_get_distrib() function in a cost or selectivity function to obtain the distribution information for the column with which an argument passed into the expensive UDR is associated.
See the descriptions of the following functions: mi_funcarg_get_argtype(), mi_funcarg_get_colno(), mi_funcarg_get_constant(), mi_funcarg_get_datalen(), mi_funcarg_get_datatype(), mi_funcarg_get_routine_id(), mi_funcarg_get_routine_name(), mi_funcarg_get_tabid(), and mi_funcarg_isnull().
For more information, see Creating Selectivity and Cost Functions.