Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re^4: DBI speed up needed on MySQL

by shenme (Priest)
on May 08, 2005 at 05:42 UTC ( #454972=note: print w/replies, xml ) Need Help??

in reply to Re^3: DBI speed up needed on MySQL
in thread DBI speed up needed on MySQL

See also the rather amazing "let's use hashes, but magically with bind" example in the DBI docs, in section "DBI STATEMENT HANDLE OBJECTS" "Statement Handle Methods" under 'bind_columns'. This uses the (most?) efficient way to populate a hash with the next record of data.
$sth->execute; my %row; $sth->bind_columns( \( @row{ @{$sth->{NAME_lc} } } )); while ($sth->fetch) { print "$row{region}: $row{sales}\n"; }

Also, have you quantified the amount of data you need to paw through, in kilobytes or megabytes? Perhaps the sheer quantity of data you're moving (perhaps through a network connection?) is many many megabytes?

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2017-05-29 19:44 GMT
Find Nodes?
    Voting Booth?