in reply to Benchmarking Oracle - stored proc or insert

I hazily remember having to commit inserts to Oracle before they would become effective. Do you have AutoCommit turned on? If you don't, that could definitely be the problem. =)

Otherwise, from a style standpoint, you might like this better than how you're using eval:

my $sth = $dbh->prepare('...'); $sth->execute($id, $name, $card) || die "problemos $sth->errstr\n";

'kaboo

Replies are listed 'Best First'.
Re: Re: Benchmarking Oracle - stored proc or insert
by arturo (Vicar) on Dec 19, 2000 at 20:03 UTC

    AutoCommit, from what I understand, tends to slow things down (it has to commit, then flush the 'pending changes' buffer -- or whatever you call it -- on each insert). I have an app that inserts 300K rows daily, so what I did is commit every 5000 rows (and one at the end of the insertion loop, just to make sure =). That sped things up significantly. Using bind_columns also made a measurable (positive) difference.

    Philosophy can be made out of anything. Or less -- Jerry A. Fodor

Re: Re: Benchmarking Oracle - stored proc or insert
by agoth (Chaplain) on Dec 19, 2000 at 18:08 UTC
    Ive got RaiseError on so the || die stuff would be superfluous anyway, Autocommit is on by default. I may try and turn it off and just do one commit at the end and see if it makes any difference.

    NOTE: Chuffin 'eck turning off autocommit and doing one at the end makes the whole lot about 10x faster, i guess its just not committing every call...