- or download this
my $sth = $sth->prepare ("select field from table");
$sth->execute;
...
my $field;
$sth->bind_columns (\$field);
$sth->fetch; # fastest
- or download this
my $sth = prepex (
"select field1, field2",
...
while ($sth->fetch) {
:
}
- or download this
UNIFY
============== Benchmarks (2500 records)
...
array: 76 wallclock secs ( 73.85 usr + 0.47 sys = 74.32 CPU) 12
+774.60 rec/s 47.30 %
arrayref: 73 wallclock secs ( 70.89 usr + 0.42 sys = 71.31 CPU) 13
+313.80 rec/s 4.22 % 53.51 %
bindcol: 69 wallclock secs ( 67.44 usr + 0.47 sys = 67.91 CPU) 13
+980.40 rec/s 5.01 % 61.20 %