Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Slow Query in PL/SQL Block
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 DBAReceived on Sun Aug 14 2005 - 14:32:37 CDT
![]() |
![]() |