I think the only clues the optimizer consults with regard to UDFs is the
'characteristic' provided at the time you create the routine.
from http://dev.mysql.com/doc/refman/5.0/en/create-procedure.html
*
*
*characteristic*:
COMMENT '*string*'
| LANGUAGE SQL
| [NOT] DETERMINISTIC
| { CON
Does the optimizer look into function called from query?
In my queries the expression (SELECT hwyl FROM Stock) / (SELECT regularPayment
FROM Stock), where Stock is a one-record table, often is repeated. The
optimizer sees that, and makes the ratio a constant, and I can afford to be
clear. If th