Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> ref cursor slow compared to sql query

ref cursor slow compared to sql query

From: Allan Streib <streib_at_cs.indiana.edu>
Date: Tue, 22 Jun 2004 02:14:05 -0500
Message-ID: <Pine.GSO.4.58.0406220206370.17670@sheepskin.cs.indiana.edu>


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." -- Chaucer
Received on Tue Jun 22 2004 - 02:14:05 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US