By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,360 Members | 3,011 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,360 IT Pros & Developers. It's quick & easy.

The Old Storing Images in DB question

P: n/a
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.

Nov 6 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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" <sp*******@tiscali.co.ukwrote in message
news:11**********************@h54g2000cwb.googlegr oups.com...
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.

Nov 6 '06 #2

P: n/a
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" <sp*******@tiscali.co.ukwrote in message
news:11**********************@h54g2000cwb.googlegr oups.com...
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.

Nov 6 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.