Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FILESTREAM vs VARBINARY for smaller files

I could not find an exact answer to this here; please correct me if I'm wrong.

Is there a compelling reason to use VARBINARY for document files that have an expected median size of 40KB, with extremely rare outliers that can reach 2MB (when someone uploads a scan)?

According to Technet:

[FILESTREAM is appropriate when] Objects that are being stored are, on average, larger than 1 MB.

...which in my case will be far from the truth.

The file table itself will be pretty small; 2000 files at the absolute limit. Bulk downloads will be limited to 10 files.

In this context, there may be no difference at all between FILESTREAM and VARBINARY(MAX). Are there factors besides file size and bulk downloading to consider when making the choice?

like image 517
user27636 Avatar asked Feb 13 '23 07:02

user27636


1 Answers

From the performance perspective, there is no need for you to take the FILESTREAM route.

It does, however, have one other possible advantage over VARBINARY(MAX) -- an application can access it "directly" using SqlFileStream.

like image 178
dean Avatar answered Apr 28 '23 14:04

dean