Forums | Admin

Discussion Forums: open-discussion

Start New Thread Start New Thread

 

By: Darren Hardy
MySQL fetch usage [ reply ]  
2007-08-15 16:53
I'm seeing large memory requirements when using fetch with text blobs. Here's some example code:

sth = dbh.prepare('select text_column from mytable')
sth.execute
sth.fetch do |row|
do_something row
# no longer need this row data
end
sth.finish

Is this the correct DBI usage? How do I free the memory associated with each row? Where are some better examples of DBI usage?

Thanks!