I would like to improve the performance of a query, which does has a where clause with a non-deterministic function call.
Select Count(*) From table1 Where
Have you tried to use the Local Temporary Table to first insert all the required records ? Finally, do the calculations on temporary table and return it.