Re: Problem with ROWNUM and REF CURSOR

From: Mladen Gogala <gogala.mladen_at_gmail.com>
Date: Thu, 22 Nov 2012 14:53:11 +0000 (UTC)
Message-ID: <k8le8n$cnr$10_at_solani.org>



On Thu, 22 Nov 2012 01:26:32 -0800, svardhan wrote:
> Instead of CURSOR_NAME%NOTFOUND use CURSOR_NAME%COUNT=0;
> On Friday, June 16, 2000 12:30:00 PM UTC+5:30, gia..._at_my-deja.com wrote:

>> I have a stored procedure that returns a ref cursor using a query like
>> this:
>>
>> open rc for select /* BIG QUERY */
>> where rownum < 11;
>>
>> where rc is a ref cursor variable.
>>
>> At the client side I can fetch the first 10 rows quickly, but the 11th
>> fetch (that yelds NOTFOUND)
>> is very very slow.
>>
>> Could anyone help me?!
>>
>> Thank You!
>>
>>
>> Sent via Deja.com http://www.deja.com/
>> Before you buy.

Use row_number instead of rownum. Also, use a materialized view.

-- 
http://mgogala.byethost5.com
Received on Thu Nov 22 2012 - 15:53:11 CET

Original text of this message