Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: DBI Performance help

by clueless newbie (Friar)
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 chilling in the Monastery: (5)
As of 2014-08-22 00:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (144 votes), past polls