Open flin-8 opened 4 years ago
Release Note: Reduce fragmentation on Event table (This upgrade will take more time and disk space than normal because we are rebuilding Event table, which can be large. Please allow 1-2 hours and free space equal to the database size for the upgrade)
Unfortunately we had to roll this back in https://github.com/OctopusDeploy/OctopusDeploy/pull/7659 due to the disk space usage
Are you a customer of Octopus Deploy? Don't raise the issue here. Please contact our support team so we can triage your feature request, making sure it's handled appropriately.
Prerequisites
The enhancement
What is the problem this solves or benefit it gives
Our
Id
columns (Events-123
) are strings that not sortable due to the lack of zero padding. Having the clustered index based on this column means that the table fragments unnecessarily over time (for example when you jump from99
->100
).This is problematic for the
Event
table because:Event
table is large and the index takes a while to rebuild when fragmentedId
rather thanAutoId
which is much smaller.Proposed solution
Change the clustered index to the existing identity column
AutoId
, so there should be no fragmentation.