+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Storing documents on filesystem or database SF 5.4

Storing documents on filesystem or database SF 5.4

5 posts, 0 answered
  1. Quan
    Quan avatar
    9 posts
    Registered:
    24 Jan 2013
    17 Apr 2013
    Link to this post
    All,

    I've gathered opinions and searched around the web.  We are having internal discussions about storing PDFs, PPTs, and general Microsoft documents either on the filesystem or within the SF database.  Anyone have real world experience and care to share?  We have a large number of files (~ 7GB), but none of the files are very large (all less than ~20 MB)...Thanks for any time and input.
  2. Craig
    Craig avatar
    82 posts
    Registered:
    07 Apr 2009
    17 Apr 2013
    Link to this post
    Quan,

    I think there are advantages and disadvantages to both storage options.

    Some items to keep in mind for database storage are...
    - All content is stored in one single location.
    - Backing up all of you content is really simple.  Just backup and restore the DB and there is your content.
    - Optimize your database before storing a lot of files in it.  By default Microsoft SQL Server databases are set to grow by 1MB at a time.  So if you upload a 50MB file your database will have to grow 50 times.  A good practice would be to pre-grow your database to 500MB and have your database grow in 500 MB increments.

    Some items to keep in mind for file system storage are...
    - It takes longer to stream bits in and out of a database than a file system.  The process can be faster.
    - Database storage is more expensive than file system storage so you will save costs.
    - If you use file system storage you also have to remember to backup the external files since all your content is NOT stored in the database.

    It really comes down to preference and remember you can start with one storage option and switch to another if your requirements change.  Hope this helps.


    Craig
  3. Quan
    Quan avatar
    9 posts
    Registered:
    24 Jan 2013
    17 Apr 2013 in reply to Craig
    Link to this post
    Thanks, Craig!  I'm still open to hearing any other opinions/recommendations if anyone cares to post...Have a question...If we were to switch from one solution to another, which one would you think would be easier to start out with if we were to switch implementations let's just say a year from now.
  4. Stefani Tacheva
    Stefani Tacheva avatar
    718 posts
    Registered:
    21 Nov 2016
    22 Apr 2013
    Link to this post
    Hi,

    I would suggest keeping images, documents and videos in the database. In most instances the file system is faster, however, due to Sitefinity's architecture the difference between storing these items in the database and filesystem is not noticeable. In some cases it is beneficial to keep them in the databases regarding how Sitefinity handles image processing and management as well as URL generation and updates to the media properties. This is why we have the database as the default provider and not the file system. If the file system were the noticeably better option it would be default.

    All the best,
    Stefani Tacheva
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Quan
    Quan avatar
    9 posts
    Registered:
    24 Jan 2013
    22 Apr 2013 in reply to Stefani Tacheva
    Link to this post
    Thank you for your response, Stefani.  This helps!
5 posts, 0 answered