If I call a function several time then will it execute every time or just execute once and the value will be used then after several time? Example:
select my_fu
Why not use a variable that catch the value of your function. For example:
declare var_function (datatype(size)); // just to declare proper data type for your function
set var_function = my_function('filed');
select var_function, var_function/field2,
(var_function*field1)/field3,
....from my_table where group by filed1;
in that case, you'll be going to reuse the function result and no need to repeat the process of the function.