What's the difference?
while(@row = $sth->fetchrow_array) { }
- one field: 3100 fetches per cpu second
- ten fields: 1000 fetches per cpu second
while($row = $sth->fetchrow_arrayref) { }
- one field: 5300 fetches per cpu second
- ten fields: 4000 fetches per cpu second
-
Notes:
- Timings made on an old Sparc 10 using DBD::Oracle.
- Timings assume instant record fetch within driver.
- Fields all one char. @row would be even slower for more/bigger fields.