Last post May 18, 2010 04:51 PM by snagpoonage
May 17, 2010 07:56 PM|snagpoonage|LINK
I have a website that sotres many images from movies. Some of these are very large up to 20MBsome are very small. I was just wondering what the best way to store these images is. At the moment I have them stored on the disk of my server, and I have for example
a column in my database called CoverImage which stores a link like "Images/DateNightCvr.jpg", this seems to work well but I was just wondering what the performance differences are between these two ways of storing data.
May 17, 2010 11:03 PM|thuhue|LINK
Your current way is the best. See below:
May 18, 2010 04:16 AM|MisterFantastic|LINK
I think you should atlease save the Thumbnail of the images in DB and show them as Big. Will that be efficient enough right ?
May 18, 2010 03:16 PM|atconway|LINK
The only time I reccomend storing files as a BLOB in SQL is when the images or files contain sensitive data (i.e. Medical Images, etc.) where you need the security that SQL Server provides. Otherwise storing and reading the file from a File Sytem is much
faster; you can keep a reference to the file's location in SQL Server for the best method. Read this as well:
"performance wise, including an <IMG SRC> tag generated by the database and pointing to a file that already exists is going to be faster than pulling the file out of the database, generating a temp file on the web server, and streaming that to the user.
Also, table scans take more resources when there is an image datatype as opposed to a varchar that simply holds a 'pointer' to the file's location."
Should I store images in the database or the filesystem?
May 18, 2010 04:51 PM|snagpoonage|LINK
I think you've convinced me to stick with my orgininal plan :)