|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Thursday, November 06, 2008 2:12 PM
Points: 10,
Visits: 14
|
|
Yes. For larger blobs it's more efficient to use the GetPath() and Open SqlFilestream() functions to get an open file handle and use that to access the data under SQL control. For smaller blobs the overhead of opening and closing the file overwhelms the faster data transfer.
Kevin Farlee SQL Server Storage Engine PM
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Friday, December 03, 2010 3:56 AM
Points: 124,
Visits: 91
|
|
SQL SERVER has provided a way to handle files and backup - recovery problems. Also it is recommended that this should be used when file size is above 1 MB.
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Wednesday, January 16, 2013 7:40 AM
Points: 136,
Visits: 259
|
|
Designers of document storage and mgmt apps (with large document objects) had to decide where to store the objects. These included document management systems like LiveLink, and more recentlySharepointt. As internet bandwidth increases, applications that use large files are expanding, including video and music files. LiveLink, as a document management system supported both (either) the storing of documents in the database as blobs, or in external files. As some of the earlier comments noted, large blobs were slow, so most installations used external files. That allowed the database, which then only held meta-data, be be fairly small, fast, and to only require a modest server.
Naturally, maintaining the correct linkage between the external files and the internal database records added some additional overhead. But not really any more than the double-linked system the database engine uses to maintain page consistency.
Filestream gives you an option, but like all options, only use it if it makes sense, and meets the business objectives. My guess is that for many cases, storing files completely outside of the database (the current approach), and only storing the metadata in the database will tend to be the best approach.
The more you are prepared, the less you need it.
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Thursday, November 06, 2008 6:16 PM
Points: 10,
Visits: 20
|
|
Andrew:
I agree with you that from a performance standpoint, storing these files in the native file system is the better option.
But then, data recoverability is an issue. I had worked on a project that managed cases in XML and the XML files were stored in Documentum. We had to minimize data loss (once-a-day backup was not acceptable) and you had buy a pricey third-party software to ensure that data loss was restricted to 15 minutes in case of data corruption/system outage etc.
Venki
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Wednesday, January 16, 2013 7:40 AM
Points: 136,
Visits: 259
|
|
Yes, it really gets down to understanding both the requirements and the tools. I see many troubled/problem applications/systems where lack of storage knowledge was the biggest problem with the system. Storage being both database and overall file system.
The more you are prepared, the less you need it.
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Thursday, June 13, 2013 9:09 AM
Points: 10,
Visits: 341
|
|
Excellent article! Very well written and most of the advice in the comments are spot on.
I have a slightly off-topic question. We are currently still on SQL Server 2005. We will not move to SQL Server 2008 until at least Q2 2009.
I have to implement a system on SQL Server 2005 that basically mimics a document management system.
Do I save the BLOBs to a MAX field in the database or do I save the BLOB to the File System? Which method will be the easiest/less work to convert to FILESTREAM?
Thank you in advance.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Monday, October 24, 2011 12:39 AM
Points: 1,
Visits: 4
|
|
| Can I use queries with FREETEXT, CONTAINS, NEAR etc. with data(content of text files or doc files) stored using sql filestream?
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, April 23, 2013 11:17 AM
Points: 2,
Visits: 20
|
|
Great article! Have a question for you... Can I attach a file saved on a Filestream column to an email sent with sp_send_dbmail?
Any insight will be greatly appreciated!
-M
|
|
|
|