Optimizing UDF - Is Using DUAL Expensive
Question
I am new to Oracle technology (primarily versed in SQL Server) and I am having trouble with the performance of a UDF.
The purpose of the UDF is to take some inputs for an "event", and look up an "expected time for event b to occur". The function returns a single DATE
value.
The first thing that occurs is a SELECT ... INTO [variable] FROM DUAL;
a variable. Finally a lookup occurs in a reference table (only ~30k rows), and that is stored in the return variable.
It took 8 hours to process on 800k rows. I can select all of the columns without using the function in less than 40 seconds.
My main question is: Is the use of DUAL costing me?
We are on an Oracle 11g RAC.
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange