I have an existing database containing some pictures in blob fields. For a web application I have to display them.
What's the best way to do that, considering stress on the server and maintenance and coding efforts.
I can think of the following:
- "Cache" the blobs to external files and send the files to the browser.
- Read them from directly the database every time it's requested.
Some additionals facts:
- I cannot change the database and get rid of the blobs alltogether and only save file references in the database (Like in the good ol' Access days), because the database is used by another application which actually requires the blobs.
- The images change rarely, i.e. if an image is in the database it mostly stays that way forever.
- There'll be many read accesses to the pictures, 10-100 pictures per view will be displayed. (Depending on the user's settings)
- The pictures are relativly small, < 500 KB