COSTFUNC (C)
Use the COSTFUNC modifier to specify the cost of a UDR. The cost of the UDR is an estimate of the time required to execute it.
Occasionally, the cost of a UDR depends on its inputs. In that case, you can use a user-defined function to calculate a cost that depends on input values.
To execute cost_func, you must have Execute privilege on it and on the UDR.