开发者

SQL Filestream for objects which size is less than 1MB

开发者 https://www.devze.com 2023-03-23 23:06 出处:网络
I store many small images in database and want to use filestream feature of SQL server. But Microsoft recommends to use it for the objects larger than 1MB, but my average object size is 300KB. So I wo

I store many small images in database and want to use filestream feature of SQL server. But Microsoft recommends to use it for the objects larger than 1MB, but my average object size is 300KB. So I would like to know, will Filestream work? If so what are the disadvantages? I use SQL S开发者_如何学Goerver Express 2008 R2 and I hope that this feature will help me to save database size, otherwise it grow up to express version limited size. Thanks


Microsoft deals with this in their documentation:

When to Use FILESTREAM

In SQL Server, BLOBs can be standard varbinary(max) data that stores the data in tables, or FILESTREAM varbinary(max) objects that store the data in the file system. The size and use of the data determines whether you should use database storage or file system storage. If the following conditions are true, you should consider using FILESTREAM:

  • Objects that are being stored are, on average, larger than 1 MB.
  • Fast read access is important.
  • You are developing applications that use a middle tier for application logic.

For smaller objects, storing varbinary(max) BLOBs in the database often provides better streaming performance.

So it should work (assuming Express supports it) -- you might just have impaired performance over the in-database approach for smaller objects.

0

精彩评论

暂无评论...
验证码 换一张
取 消