Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Benchmarking Oracle - stored proc or insert

by mwp (Hermit)
on Dec 19, 2000 at 17:50 UTC ( [id://47386]=note: print w/replies, xml ) Need Help??


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...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://47386]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (11)
As of 2024-04-23 21:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found