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

Re: DBI Performance help

by clueless newbie (Chaplain)
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://864392]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2017-06-24 03:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (556 votes). Check out past polls.