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

Forums / Deployment / How do I reduce the database size of a Sitefinity 4 website?

How do I reduce the database size of a Sitefinity 4 website?

4 posts, 0 answered
  1. Jeff Mah
    Jeff Mah avatar
    31 posts
    Registered:
    25 Feb 2005
    14 Aug 2011
    Link to this post
    Hello,

    Does anybody know of some good steps for reducing the database size of my Sitefinity 4 website? In 3.x there were some commands that could be run to delete version/unused data from the database. Is there something similar we could do in 4.x?
  2. Boyan Barnev
    Boyan Barnev avatar
    1429 posts
    Registered:
    08 Dec 2016
    15 Aug 2011
    Link to this post
    Hi Jeff Mah,

    A major impact on the DB size might be moving the Media modules contents from DB to the filesystem - we have introduced the feature for  alternative file storage: file system for the Images, Videos, Documents & Files Libraries in our Sitefinity 4.2 release.
    Concerning  content  versions, you can access the version history data using VersionManager and delete the items programatically. Please take a look at this forum thread where we have provided a sample on using the VersionManager and working with content version history.
    If there's anything else you'd like to ask , please do not hesitate to get back to us.

    Greetings,
    Boyan Barnev
    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
  3. Jeff Mah
    Jeff Mah avatar
    31 posts
    Registered:
    25 Feb 2005
    26 Aug 2011
    Link to this post
    That helped quite a bit. Is there any way to turn off or limit page versioning? I need to keep the size of the database under control. After deleting page history and empty control properties we were able to reduce the size down from 220 MB to 120 MB which still seems very large to me, however, I can work with that as long as I can limit the growth. How can I do so?

    Another question: Is there any reason the sf_control_properties table is so large? It's approximately 53 MB in size with 46,000 rows.
  4. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    31 Aug 2011
    Link to this post
    Hello Jeff Mah,

    Page versioning cannot be turned off as it is a main features in Sitefinity allowing you to have backups of your pages. Without it if a page is a broken you will not be able to restore its contents.

    However the test is not easily achievable because the delete operations leave traces in the database. As my colleague suggested you can use the FileSystem to store your documents, images and videos instead of the database. The database expansion depends on your activities like  for example if you inserting large media files or creating large amount of content. If your project has many users which are active, your database will get larger in time, however 120MB is hardly considered to be large database.

    Regarding your second question: The sf_control_properties contains all the properties and definitions of the controls that are used throughout Sitefinity. If you have custom controls their settings and properties will be also saved in that table.

    Best wishes,
    Victor Velev
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

4 posts, 0 answered