Skip to main navigation Skip to main content

Addressing Database Size Challenges in Kentico Solutions

What we think.

Addressing Database Size Challenges in Kentico Solutions

Take a dive under the surface to effectively manage your Kentico database via Attachment and Object Version History, and Contact and Activity Data.

As seasoned website developers with Kentico, we've long appreciated its robust capabilities in powering the digital solutions for our clients. From seamless content management to dynamic web experiences, Kentico has been our trusted companion in achieving the goals of our clients for over 10 years. Yet, as our usage of the platform matured, so too did the challenges we encountered, with database size and performance often taking centre stage.

In this piece, I want to explore the ins and outs of managing Kentico to optimize data storage within its ecosystem. Specifically, I'll be focusing on two key areas: Attachment and Object Version History, and Contact and Activity Data. My goal is to offer insights and strategies to help navigate the complexities of Kentico database management, ensuring that Kentico solutions maintain their reputation for delivering exceptional digital experiences efficiently.

Isometric rendering of data storage towers

Attachment and Object Version History


Attachments and objects play a pivotal role in Kentico, facilitating the integration of multimedia content, documents, and various data types into websites and applications. However, every iteration or update made to these entities generates a new version, thereby contributing to the expansion of the database. While this versioning mechanism offers valuable benefits in terms of content management and revision control, it can inadvertently lead to database inflation, particularly in scenarios involving frequent updates to large volumes of multimedia assets.

3D rendering of duplicated folders, fading out into the abyss

In understanding attachment and object versioning's significance, it's crucial to explore their impact on Kentico database size and performance. Kentico adeptly manages version history binary data using tables and metadata, associating each attachment iteration with essential details like file size and timestamps, reducing redundancy and optimizing storage efficiency. However, directly storing files in the database, while ensuring consistency, can introduce performance challenges due to increased I/O overhead. Databases are optimized for structured data storage and retrieval, but handling large binary files can lead to performance degradation and resource consumption during operations like backup and restoration. Administrators must balance centralized data storage benefits with performance implications.


Efficiently managing object and version history within Kentico is paramount to maintaining database performance and ensuring optimal system responsiveness. Here are several strategies to assist in reducing the size of your database with regards to the object and version history:

Clearing objects from the recycling bin

When objects are deleted through the Kentico interface, they automatically moved into the recycling bin. Under the hood, this recycling bin stores a copy of the deleted entity in the object version history, allowing it to be restored in the situations where it may be required again in the future. For media items and other binary types, this results in a copy of the deleted file being stored as binary data in the database. If not cleaned up regularly, this data will continue to accumulate. By regularly reviewing the recycling bin contents, administrators can easily remove deleted media files and binary data, preventing unnecessary accumulation of obsolete or redundant content. A good practice would be to regularly remove deleted objects older than an agreed threshold (e.g. 30/60/90 days).

Screenshot of Clearing objects from the recycling bin in the Kentico admin

Reduce the stored versions of objects

Kentico automatically reduces the number of stored major and minor versions of content and objects, thereby limiting the amount of data it retains. The number of versions that are stored is configurable in the Kentico settings and should be considered on a case-by-case basis per site as reducing the number of versions also affects the ability to roll back to a previous version should the need arise.

Screenshot of object versioning in the Kentico admin

Automated clean-up of deleted objects

Automating the clean-up of old version data can also work to reduce the unnecessary storage of obsolete and redundant content. Using Kentico’s scheduled tasks module, a custom scheduled task can be created to automatically complete actions such as, emptying the recycling bin and removing old versions of objects and content that is older than a specified threshold.

Examples of these scheduled tasks can be found at

Screenshot of Automated clean-up of deleted objects from within the Kentico Admin

Contact and Activity Data


Kentico databases often accumulate a significant amount of contact and activity data, further contributing to database size and performance considerations. As websites and applications powered by Kentico interact with users, they collect a wealth of information related to user interactions, engagements, and behaviour.

This data includes user profiles, preferences, session logs, clickstream data, form submissions, and other metrics that provide insights into user engagement and website performance. While invaluable for marketing analytics, personalization, and customer relationship management, the sheer volume of contact and activity data can strain database resources and hinder system performance if not managed effectively.

As the database grows, queries and operations involving contact and activity data may experience latency, impacting response times and user experience. Moreover, the indexing and optimization of tables housing this data become increasingly critical to maintain acceptable performance levels, especially in high-traffic environments.


In this section, I’ve outlined effective strategies for reducing bloat in the contact management database, ensuring optimal performance and resource utilization in Kentico-powered applications.

Splitting the database

Built into the Kentico interface is the ability to split the database to separate out the contact and activity data. This procedure introduces a few different benefits including reducing the overall time for backup, restore and maintenance of the primary content database as well as allowing for the allocation of separate resources for the contact management database.

Screenshot of Splitting the database in the Kentico Admin

Create a more targeted approach

By default, the contact and activity tracking captures as much information as possible to enable Kentico administrators to get the most capability out of the box. Often clients will have specific marketing targets and strategies in place that would enable us to restrict the quantity of information captured to meet their needs more precisely. By taking a more targeted approach, we can reduce the types of activities captured and, in-turn, reduce the overhead on the database while still meeting the needs of our clients and their marketing teams.

Screenshot of creating a more targeted approach in the Kentico Admin

Remove inactive contact and activity records

Ensuring that stale and incomplete data is pruned regularly will reduce the amount of bloat in the database. Often this type of data is also not able to be used effectively and therefore serves no purpose being retained long term.

Screenshot of removing inactive contact and activity records in the Kentico Admin

Excluding health probes, bots and crawlers

Following on from the previous point, one such contributor to stale and incomplete data, can be the capturing of activities related to bots and health probes. Kentico comes with a predefined list of values it expects to find in the requests being received from a bot or health probe. Given that it is a predefined list, there are several services available that would not be covered by the exclusion list, and thus would contribute to the bloat. By implementing a custom crawler checker, you can implement your own rules around identifier non-user requests.

An example of a custom crawler implementation can be found at

Screenshot of an example snippet of the excluded keywords from the source code


In conclusion, effective database management is critical for maintaining optimal performance and scalability in Kentico solutions. By implementing strategies to address attachment and object versioning, contact and activity tracking, and other database-related challenges, users can ensure that their Kentico-powered applications remain efficient and responsive. Whether it's pruning unnecessary data, optimizing database configurations, or leveraging advanced techniques at the database level, proactive management is key to mitigating database bloat and maximizing performance.

By staying informed about best practices and collaborating with database administrators, we can help our clients navigate the complexities of database optimization with confidence, unlocking the full potential of their solutions to deliver exceptional digital experiences. With a strategic approach to database management, we can continue to innovate and thrive in the ever-evolving landscape of web development and content management.

Want to get started with Kentico Xperience?

Speak to us about how you can use Kentico Xperience to create engaging experiences in your next digital project.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.