From: Marnen Laibow-Koser Date: 2009-12-10T23:22:47+09:00 Subject: Re: Mysql::Error: Data too long for column Steve Wilhelm wrote: > Marnen Laibow-Koser wrote: >> rabarama wrote: >>> probably, this is the problem, tomorrow I'll try with mediumblog. >>> Thanks a lot. >> >> Better to use the filesystem. Sizable binaries in the DB are not a good >> idea. >> >> Best, >> --  >> Marnen Laibow-Koser >> http://www.marnen.org >> marnen@marnen.org > > I think its more accurate to say mixing meta and binary data in the same > MySQL table is not a good idea. > > Storing binary data in a separate table (and even database) from meta > data minimizes the binary data's performance impact and allows one to > use MySQL to manage referential integrity across the meta and binary > data. As far as I can see, the only advantage of storing binarie in RB tables is to be able to store them with their metadata. If you split them into their own table, then you're just reinventing a filesystem on top of the existing filesystem. In other words, if you use binary fields, you will either have performance problems or an abstraction inversion. Just don't. Best, --  Marnen Laibow-Koser http://www.marnen.org marnen@marnen.org -- Posted via http://www.ruby-forum.com/.