Storing documents on filesystem or database SF 5.4

Posted by Community Admin on 04-Aug-2018 14:54

Storing documents on filesystem or database SF 5.4

All Replies

Posted by Community Admin on 17-Apr-2013 00:00

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.

Posted by Community Admin on 17-Apr-2013 00:00

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

Posted by Community Admin on 17-Apr-2013 00:00

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.

Posted by Community Admin on 22-Apr-2013 00:00

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

Posted by Community Admin on 22-Apr-2013 00:00

Thank you for your response, Stefani.  This helps!

This thread is closed