# MSSQL Server Image Datatype Performance



## RBX (Jun 14, 2012)

I need to store images using a .net application, and I'm using MS SQL Server with it. SQL server provides a datatype named 'Image', supposedly specialized for image storage.

I reckon that storing images in database would severely degrade the performance, and it would be better to store just the path to the image, but the project guide insists that we use DB to store images.
So, is Image datatype just like regular blobs or it really would be better to store the image in DB using the Image datatype ?


----------



## Prime_Coder (Jun 14, 2012)

IMO, it would be better to store the image in DB using the Image data type for MS SQL Server.


----------



## Zangetsu (Jun 14, 2012)

u can also use Varbinary to store images in database.


----------



## RBX (Jun 14, 2012)

Apart from security (which is not required) would it not just add time required to convert between database image format and a format suitable for viewing ? Moreover, if I were to perform joins on the table, wouldn't the resulting tables just be huge ?


----------



## Zangetsu (Jun 15, 2012)

^u can't do join on image datatype


----------



## coolpcguy (Jun 15, 2012)

*dba.stackexchange.com/a/2446/120


----------



## nbaztec (Jun 15, 2012)

1. If security of the data isn't required and the images are not updated, storing just the paths is a better option.
If any of the above two criteria is required, then storing binary data in the db is the better option.

2. Would it degrade performance? Not as much you'd think. 

3. DBMS does not care about the image format of the image, the MIME type has to be accounted for separately. It's just binary data for the DBMS.


----------

