Connecting Tech Pros Worldwide Help | Site Map

The Old Storing Images in DB question

Spondishy
Guest
 
Posts: n/a
#1: Nov 6 '06
Hi,

I've taken over a publishing application that stores images in a sql
server db. The architecture is basically many load balanced web servers
connecting to the db. When an image is pulled from the db it uses an
aspx page similar to this <img src="image.aspx?imgid=1" />

I realise there are trade offs between performance security etc, but I
think this is going to be a bottleneck in the app going forward. Is
there anything I can do to improve the output of the binary data from
the db? Any cacheing trick for example?

Thanks.

Aidy
Guest
 
Posts: n/a
#2: Nov 6 '06

re: The Old Storing Images in DB question


Is it a requirement that the images stay in the database? Ideally you'd
store them on the file system and keep the filename info in the database.

What you could do in your image.aspx page is pull the image from the
database and save it to a folder. Before images are pulled from the DB you
check to see if there is a stored version, and if there is write that
version to the stream instead of reading from the database.

You might want an "updated date" field with your images to ensure you can
always get from the database if the image has been updated since you stored
it.

"Spondishy" <spondishy@tiscali.co.ukwrote in message
news:1162808682.459563.303300@h54g2000cwb.googlegr oups.com...
Quote:
Hi,
>
I've taken over a publishing application that stores images in a sql
server db. The architecture is basically many load balanced web servers
connecting to the db. When an image is pulled from the db it uses an
aspx page similar to this <img src="image.aspx?imgid=1" />
>
I realise there are trade offs between performance security etc, but I
think this is going to be a bottleneck in the app going forward. Is
there anything I can do to improve the output of the binary data from
the db? Any cacheing trick for example?
>
Thanks.
>

Steve C. Orr [MVP, MCSD]
Guest
 
Posts: n/a
#3: Nov 6 '06

re: The Old Storing Images in DB question


I feel storing images in a database *can* be effective and scalable in many
situations.
My arguments are stated here:
http://SteveOrr.net/articles/EasyUploads.aspx

For further optimization I suggest you look into using output caching on
your image.aspx page.
Here's more info:
http://blogs.ittoolbox.com/c/program...put-cache-9748

--
I hope this helps,
Steve C. Orr
MCSD, MVP, CSM
http://SteveOrr.net


"Spondishy" <spondishy@tiscali.co.ukwrote in message
news:1162808682.459563.303300@h54g2000cwb.googlegr oups.com...
Quote:
Hi,
>
I've taken over a publishing application that stores images in a sql
server db. The architecture is basically many load balanced web servers
connecting to the db. When an image is pulled from the db it uses an
aspx page similar to this <img src="image.aspx?imgid=1" />
>
I realise there are trade offs between performance security etc, but I
think this is going to be a bottleneck in the app going forward. Is
there anything I can do to improve the output of the binary data from
the db? Any cacheing trick for example?
>
Thanks.
>

Closed Thread