How do I reduce the database size of a Sitefinity 4 website?
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?
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
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.
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 >>