in reply to DBI speed up needed on MySQL
Do you really need all 200 columns when you select? If not, you could select only those that you do need and save yourself some bandwidth. Also, I don't know if it's faster than fetchrow_hashref, but I like to use fetch like so when I need access to the columns by name
Maybe I should benchmark it...my @fields = qw(foo bar baz); my %results; $sth->execute(); $sth->bind_columns(@results{@fields}); while( $sth->fetch() ) { #your results will be available in %results }
thor
Feel the white light, the light within
Be your own disciple, fan the sparks of will
For all of us waiting, your kingdom will come
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: DBI speed up needed on MySQL
by jacques (Priest) on May 08, 2005 at 04:13 UTC | |
by graff (Chancellor) on May 08, 2005 at 04:59 UTC | |
by shenme (Priest) on May 08, 2005 at 05:42 UTC | |
by bart (Canon) on May 08, 2005 at 09:42 UTC | |
by jacques (Priest) on May 09, 2005 at 00:20 UTC | |
by merlyn (Sage) on May 08, 2005 at 18:17 UTC | |
by willyyam (Priest) on May 09, 2005 at 12:45 UTC | |
by jacques (Priest) on May 09, 2005 at 18:46 UTC | |
by merlyn (Sage) on May 09, 2005 at 20:17 UTC |
In Section
Seekers of Perl Wisdom