Best unofficial Apache Server developers community
Username
Forgot password?
Sign in with Twitter account
Sign in with Facebook account

Is returning Curosrs faster?

0

35 views

When using stored procedure is it faster to return a cursor back? or is it faster to use the out data parameter of the data type. or it really won't have any performance difference.

PROCEDURE SPUSINGCURSOR
(
input1 INT,
retcursor out sys_refcursor
)
 IS
BEGIN
OPEN retcursor FOR
SELECT  
    var1,
    var2,
    var3
FROM
    Table_Vlaues
WHERE 
    var1 = input1
ORDER BY var1;
END;

asked June 21, 2011 8:57 pm CDT
posted via StackOverflow

1 Answer

0
 

Depending on the amount of information you are dealing with. In smaller tables ie. less than 1,000 records, you won't notice a sizeable difference in time. However, in large tables, the general rule is to stay away from cursors unless it is absolutely necessary to use. I have always found stored procedures to be quicker.

answered June 21, 2011 9:26 pm CDT

Your answer

Join with account you already have


Sign in with Twitter account
Sign in with Facebook account
Sign in with Google Friend Connect

Preview
Similar questions
Mysql Faster UPDATE
March 5, 2011
Faster mysql query
January 24, 2011