Frage

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?

War es hilfreich?

Lösung

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.

Andere Tipps

In SQL Server 2008, if a varbinary column is defined to be stored as a file stream, the binary data is stored in a special folder structure which is managed by the SQL Server engine. The only thing that remains inside the database is a pointer to the file along with a mandatory GUID column in order to use the file stream from the Win32 client. I think, it helps you to understand your issue.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top