Originally posted by mber
The first one is more efficient, not fuction call overhead.

Take care
Wrong, the second one is more efficient!

Remember that MOD is a built-in function, it will require no more of procesor's time as incrementing a variable! None of those two two operations will require more than one processor tick (is this the right term for granularity of processor's time in which a single instruction can be executed?).

But on 200 M row table and commiting every 1.000 records, the variant with the explicit counter variable will have to execute "v_help := 0;" 200.000 times! This is overhead!

In any case, I don't belive the difference in the performance on either two cases will be mesurable at all! The point is, the use of %ROWCOUNT is much less error-prone than maintaining a special variable for this. I'm sure somewhere in the cours of our PL/SQL careers every one of us have made the same error as both posters of PL/SQL code have made - to forget to reset the counter. With MOD() and %ROWCOUNT you simply can't forget, as there is nothing to reset.