Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: help with closing a cursor
It may not be the loop thats the problem, if the tables you are
inserting/updating etc have triggers based on them which populates audit
tables, other validation etc, this will have an effect on the speed of your
loop.
Also, if it is feasible for your application, issuing a commit inside the loop may speed things up.
Mark
mikey wrote in message <7dvf0d$o18$1_at_nnrp1.dejanews.com>...
>Hi all
>
>I have got a cursor with open about 4000 rows , processing the cursor I do
>various update, deletes and inserts
>
>This takes a lot of processing time , the procedure sometimes takes about 1
>hour to complete . I am not a great expert in performance tuning
>but I have been told to try to use a flag in the table describing what
rows
>are not updated and then close and re-open the cursor every 1000 rows or so
>
>how the hell do I do that .. that where I need help
>
>
>ie if the cursor was as follows
> OPEN C2(v_company_code);
> LOOP <<l_c2>>
> FETCH C2 INTO cur_rec;
> EXIT WHEN C2%NOTFOUND;
>
> inserts
> deletes
> updates
> END LOOP
>CLOSE C2
>
>can some suggest what I do
>Any help would be appreciated
>
>
>Michael Dsouza
>Analyst Programmer
>United Kingdom
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Received on Thu Apr 01 1999 - 08:22:25 CST
![]() |
![]() |