Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> ref cursor slow compared to sql query
Oracle 9i R2. I have a query which I can run and returns results in
sub-second time. Total of 32 rows, not a lot of data per row (a few
numeric values and a date).
The same query, put in a procedure with some parameterized input and results returned as a ref cursor, takes an order of magnitude longer to return the same results (i.e. up to almost 10 seconds). This is noticed in both SQL Plus (i.e. declaring a refcursor variable, calling the procedure, and then printing the variable) and also calling the procedure from an ASP page.
Is this commonly seen? What is a good approach to determining the reason for this? I can understand some overhead in fetching rows from a cursor but this seems out of whack.
Allan
-- "The lyf so short, the craft so long to lerne." -- ChaucerReceived on Tue Jun 22 2004 - 02:14:05 CDT
![]() |
![]() |