Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: DBI Performance help

by clueless newbie (Hermit)
on Oct 09, 2010 at 15:32 UTC ( #864392=note: print w/ replies, xml ) Need Help??


in reply to DBI Performance help

For timings set the "Profile" on each db handle:

$dbh->{Profile} = 6;
Change:
while ( @columns = $sth1->fetchrow_array ) { $inserted += $sth2->execute(@columns); ... } }
to:
while ($row=shift(@$cache) || shift@{$cache=$sth_o->fetchall_arrayref( +undef,$max_rows) || []}) { $inserted += $sth2->execute(@$row); ... };
NB: Bunce says that optimal value for $max_row depends on the number and size of columns returned.


Comment on Re: DBI Performance help
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2015-07-04 03:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls