Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL - writing better code
Steven Feuerstein has several good books and websites and I just saw
a PL/SQL for Dummies but I dont know how good it is - I had to learn it
out of a
book and from websites 3 ys ago
I have good links at
george
RanLi wrote:
> hi
> need to run some thoughts about coding in pl/sql by someone, and you
> guys seem to be the closest. :)
>
> PROBLEM/SITUATION:
> i have a procedure that loops through a set of keys. I update a column
> for each key.
> LOOP ----
> BEGIN
> <update statement>
> COMMIT;
>
> EXCEPTION
> WHEN OTHERS
> THEN
> ROLLBACK;
> END;
> END LOOP;
>
> when is it more wise to run a commit on the data?
> - after each update?
> - after all the elements are looped through?
> If I have a lot of data that is suppose to be updated, and i have (>=
> 300000)
> is it better to do a commit for each element?
>
> thanks.-
> ranli..... :)
Received on Fri Oct 20 2006 - 13:18:46 CDT