Issues icon indicating copy to clipboard operation
Issues copied to clipboard

Database statistics being out of date can affect query performance

Open benPearce1 opened this issue 3 weeks ago • 0 comments

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

  • [x] I have searched open and closed issues to make sure it isn't already requested
  • [x] My team has started working on this issue
  • [x] I have written a descriptive issue title

The enhancement

The Need

When upgrading to a new version which includes a database migration, the server will force an index rebuild during startup which includes recomputing statistics. For instances that aren't upgraded periodically, the statistics on tables can become out of date and cause poor query performance. This is particularly true on high-write tables such as ServerTask, Deployment, RunbookRun, Event and VariableSet.

Solution

The state of database statistics are checked during the system integrity check, with a suggested script to recompute the statistics. Currently, this is left to the user to execute, to avoid impact on the sql server, and can be run at an appropriate time.

Screenshots and Mockups

Image

Links

benPearce1 avatar Dec 18 '25 00:12 benPearce1