Re: Db vs Filesystem for Binary contnet

On Oct 1, 2006, at 5:02 PM, Scott W. wrote:

I’m debating between storing binary content (i.e. images) in the db
(mysql) or the filesystem. I like the idea of the database because
everything is in one place, but I’ve heard using the filesystem has
better performance. Is storing binary content in the database a
performance hit vs. the file system, or is it just an old wives
tale? If I’m going to be writing queries against a table’s non-
binary fields will I face performance hits because binary columns
appear in the table?

The big difference is that if it’s in the filesystem, the front-end web
server can serve the file without any dynamic content at all, whereas
if it’s in the database, you involve the front-web server, application
server, and DB server.

All of which are not that much of a problem, except for the DB. Every
scaling problem I’ve ever seen that was non-trivial to fix was related
to DB contention.


– Tom M.

Tom M. wrote:

appear in the table?

Wouldn’t the file system be a concern if it wasn’t locally attached
storage in a multi-server setup?
Cheers
Mohit.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs