Hi Gurus,
we need to use a function in the Cursor query of the pl/sql procedure. However the function is taking 2-3 seconds to return data. The same SQL used inside the Function completes within milliseconds when run outside function directly. So we are unable to understand why the function execution is almost 100-200 times slower than the SQL execution.
Please help us to understand if this is something related to the database on how the context switching is performing. is there a way to optimize the context switching? or is this any coding issue? I have not provided the code here as I want to keep this a generic question.
Our database version is Oracle 19.
Regards,
Sam