Upload large files to BLOB

Hi to all.
I’m working with saving big files(~200mb) directly into db.
I have issue with that.
Caused by increased huge use of free RAM(about 3gb of ram and 3gb of
swap) on stage when file saves to db:

@job.pdf = params[:job][:pdf].read

After this is completed there is still some RAM and swap in use.
Is there some way to optimize that?
p.s. project on rails 3.0.3, uses mysql, running on mogrel.

On 13 Jul 2011, at 14:43, Alex M. [email protected] wrote:

p.s. project on rails 3.0.3, uses mysql, running on mogrel.
I don’t believe there is anyway in activerecord to stream blobs - the
entire thing will get loaded into memory. It’s not usually a great idea
in general.

Fred