I have 5 lines of code as function which is being called 100000 times is there a way to make the function inline so that I don’t experienced a call overhead in PL/SQL. Oracle 9i is the version I am using.
Update:
The In lining of code does not have much improvement but I gained 2 seconds though. Now I am looking for efficient version of float data type in pl/sql. BINARY FLOAT did not work, NUMBER(10,5) is the one already being employed.
You’ve determined that the function call overhead is not contributing much to the performance issue, so inlining would not be helpful here anyway.
I assume you’re not running any SQL or calling any SQL functions in your PL/SQL? If so I’d look there next.
Your next option is native compilation – see Compiling PL/SQL Code for Native Execution for details. You might get some improvement since you’re only doing maths.
Otherwise, you may need to look beyond PL/SQL. You can call code written in many other languages from PL/SQL, including C, C++ and Java. Refer to Calling External Procedures for more info.