To store images in SQL or not?

Posted by Brett on Stack Overflow See other posts from Stack Overflow or by Brett
Published on 2010-04-02T20:40:52Z Indexed on 2010/04/02 20:43 UTC
Read the original article Hit count: 532

Filed under:
|
|
|
|

Generally, I had thought it was always better to store images in the filesystem and link to it via the database entry. However, I am trying to optimize my db design and am having a few questions.

My images are all really small thumbmails in black and white (not greyscale, but true B&W) and are 70x70 in size. If we take the images (which is basically a 2D array of 1 and 0), it can be stored as binary data that would be approximately 600 bytes each.

So my question is whether querying the 600 bytes stored in a db would be faster than querying a link followed by accessing the filesystem; assuming there are a lot of "image" queries being made.

Does anyone have any experience with this area?

If it matters, I am using MySQL, and MonetDB (separately, but have the same question for both).

Many thanks, Brett

© Stack Overflow or respective owner

Related posts about sql

Related posts about mysql