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: performance tuning of stored procedure

Re: performance tuning of stored procedure

From: Frank van Bortel <frank.van.bortel_at_gmail.com>
Date: Fri, 01 Sep 2006 20:14:35 +0200
Message-ID: <ed9t0q$fuj$2@news1.zwoll1.ov.home.nl>


DA Morgan schreef:
> KK wrote:

>> Is there any better way of writing the below stored procedure logic for
>> performance tuning? It is taking time for large number of records.
>>
>> This has 2 for loops. The second loop gets executed (n-1) number of
>> times for each record of count n. I appreciate your ideas?
>>
>> Thanks.

>
> Dump the cursor loops and move to array processing. See the demo in
> Morgan's Library titled "FAST WAY" (www.psoug.org). Use FOR loops
> after the BULK COLLECT and before the FORALL to do work in memory.
>
> If the ORDER BY clause is not required getting rid of it will help too.
>
> I would expect getting away from single-row processing with a cursor
> loop to increase performance by at least 50X.

And removing the commit from within the loop will add a few, too

-- 
Regards,
Frank van Bortel

Top-posting is one way to shut me up...
Received on Fri Sep 01 2006 - 13:14:35 CDT

Original text of this message

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