in reply to Query takes 895ms in TOAD but 42s in DBI
I don't know the reason for the slowness, as 1100 rows isn't that much, and fetchrow_array() vs. bind_columns()/fetch() (or bind_col) doesn't explain that much of a difference (is perl/DBI and TOAD run from the same machine?). But why do you concatenate to the $csv string and only print at the end rather than just printing as you go (not that that explains any speed difference either...are you seeing all 1100 rows in TOAD, or just the first 20 or so)?