Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: DBIx::Simple opinion..

by Qiang (Friar)
on Aug 28, 2007 at 16:11 UTC ( [id://635637]=note: print w/replies, xml ) Need Help??


in reply to Re: DBIx::Simple opinion..
in thread DBIx::Simple opinion..

i like to use hashes method in DBIx::Simple. however it is very inefficient and i am wondering why you don't use bind_columns as mentioned in DBI bind_columns personally i do it in the following way which eqivalent to fetchall_hashref. not sure how much efficient it is though.
my (%row, @rows);
$sth->bind_columns( \( @row{ @{$sth->{NAME_lc} } } )); 
while( $sth->fetch ) { 
  push @rows, { %row }; 
}

Replies are listed 'Best First'.
Re^3: DBIx::Simple opinion..
by Juerd (Abbot) on Sep 02, 2007 at 21:11 UTC

    I haven't benchmarked it either. I recall having had reasons for not binding columns, but I don't remember the specifics.

    Juerd # { site => 'juerd.nl', do_not_use => 'spamtrap', perl6_server => 'feather' }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2024-04-24 18:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found