tag:blogger.com,1999:blog-7849367040589270673.post1360942625514778053..comments2024-03-21T22:50:39.997-07:00Comments on Obsessed with Oracle PL/SQL: The Joy of Low Hanging Fruit, Part 2: the Dismay and the DelightSteven Feuersteinhttp://www.blogger.com/profile/18405765731886460622noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-7849367040589270673.post-2829239152342797922014-07-07T07:42:01.732-07:002014-07-07T07:42:01.732-07:00Hi Steven,
It's outstanding your explanation ...Hi Steven,<br /><br />It's outstanding your explanation about BULK COLLECT and FORALL and we are encouraged to convert all loops containing non-query DML to a combination of BULK COLLECT and FORALL. However I have a question:<br /><br />When we have million of records to be updated, we use a counter to control when commit command should be issued, to avoid DML(update,insert, insert) consume too much UNDO TBS. The code is something like this:<br />...<br />loop<br /> insert ....<br /> cont = cont + 1<br /> If cont >= 5000<br /> commit;<br />...<br />end loop;<br />commit;<br /><br /><br />By using BULK COLLECT and FORALL, when commit command should be issued ? ( by the way, I didn´t see commit command in the procedures).<br /><br />Best regards,<br />LavieLaviehttps://www.blogger.com/profile/12140761904115367350noreply@blogger.com