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 -> Re: Slow Query in PL/SQL Block

Re: Slow Query in PL/SQL Block

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Sun, 14 Aug 2005 21:32:37 +0200
Message-ID: <tv6vf114uisoq0vnr78sc0sifcptcqik3i@4ax.com>


On 14 Aug 2005 11:01:32 -0700, brijeshmathew_at_gmail.com wrote:

>Hi Daniel
>
>Thanks for the reply.
>I am using a stored procedure, that returns a resultset, that I am
>using for reporting purposes. I have just taken the extract of my code,
>just to show where it is consuming lot of execution time, however, if I
>do an equivalent query, which is not actually my requirement here, it
>works faster.
>Thing is , for each item in the cursor, i need to calculate some
>values, like I showed in my original post. I hope I am making myself
>clear.
>You said to use collections, but I am not sure how to do that in this
>particular case that I showed you. Can you give me some example. ?
>
>Thanks
>
>Brijesh Mathew

Apart from using collections (which can be looked up in the PL/SQL manual)
queries in PL/SQL run by default in all_rows mode. If your instance is in FIRST_ROWS mode, that might explain the difference. Did you compare execution plans?

--
Sybrand Bakker, Senior Oracle DBA
Received on Sun Aug 14 2005 - 14:32:37 CDT

Original text of this message

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