http://www.perlmonks.org?node_id=346107


in reply to Re: Re: Re: Re: performance problem with oracle dbd
in thread performance problem with oracle dbd

Ah. This makes things a lot clearer. Basically Roy is right.

With your PL/SQL code you are shipping everything to the Oracle server. Oracle runs all the inserts. Finished.

With your perl code you're sending a single insert to the Oracle server. Oracle is doing the insert and telling your Perl program is succeeded. 1500 times. The extra communication overhead with each execute will almost certainly be what is slowing you down.

If the speed of multiple inserts is going to be an issue for your application it will probably be simplest to slap a lump of PL/SQL into a $dbh->do and let Oracle do it server side.