c# - Save 100000 file (1MB file) in SQL Server 2008 -
i have idea create application in c# save files pdf
, doc
, image on server , have sql server 2008 enterprise.
can save 100'000 files (of 1mb size each) in database yearly?
so need me disadvantages , database become slow
there's paper microsoft research called to blob or not blob.
their conclusion after large number of performance tests , analysis this:
if pictures or document typically below 256k in size, storing them in database's
varbinary
column more efficientif pictures or document typically on 1 mb in size, storing them in filesystem more efficient (and sql server 2008's
filestream
attribute, they're still under transactional control , part of database)in between two, it's bit of toss-up depending on use
for filegroups, check out files , filegroup architecture intro. basically, either create database separate filegroup large data structures right beginning, or add additional filegroup later. let's call large_data
.
now, whenever have new table create needs store varchar(max)
or varbinary(max)
columns, can specify file group large data:
create table dbo.yourtable (....... define columns here ......) on data -- basic "data" filegroup regular data textimage_on large_data -- filegroup large chunks of data
check out msdn intro on filegroups, , play around it!
Comments
Post a Comment