which versions are you using (SonarQube Server / Community Build, Scanner, Plugin, and any relevant extension) : 9.9.1 LTA
how is SonarQube deployed: zip
what are you trying to achieve : Want to reduce the DB size which is growing very faster.
what have you tried so far to achieve this : None
Hi Team,
I want to reduce the DB size, since development teams are using SonarQube for feature branches, pull requests and base branches. How can we reduce/optimize the DB size for this, what changes i need to apply through SonarQube UI.
Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!
If you have projects which have not been analyzed for a long time (e.g. since the last update of SonarQube), yo may consider to wipe out these stale projects.
Your version is past EOL. You should upgrade to either the latest version or the current LTA (long-term active version) at your earliest convenience. Your upgrade path is:
If you have questions about upgrading, feel free to open a new thread for that here.
Regarding your DB size, you’ll find once you’ve upgraded that we’ve taken steps in the 10-series (which culminates in 2025.1) to reduce the DB size.
And if that’s not enough, you should certainly consider adjusting the housekeeping settings, as @milbrandt recommended. Note that housekeeping doesn’t run on a cron; it’s executed as part of analysis report processing, so it doesn’t happen until you analyze.
Can’t we able to delete the older reports by applying “Number of days before purging inactive branches and pull requests reports=10” in 9.9.1 LTA version. If yes, then i will apply the [Housekeeping]. (Housekeeping | SonarQube Server Documentation…_gcl_auMTA0Mjg3MjE3MC4xNzQxMTU0Mjkz*_gaNDA5MzI3MjE1LjE3NDExNTQyOTM._ga_9JZ0GZ5TC6*MTc0MTYwNDUyMC42LjEuMTc0MTYxMjMzNC4zNS4wLjA.)
Again, this doesn’t run on a cron. You can update the housekeeping settings but then you’ll need to analyze each project before the new settings kick in on it.
Can’t we optimize DB size by applying Housekeeping settings in 9.9.1 LTA version itself without upgrading to 2025.1 version…? What is the special features that are available in 2025.1 related to optimizing SonarQube.
Hi @ganncamp
Do we have steps/queries to clean up the stale projects and one year old projects from SonarQube DB.
If yes please share it with me.
And moreover do we have LTA version available in community edition which is in 2025 releases…? I want to upgrade the SonarQube version from 9.9.1 to latest LTA version. Also, by updating sonarqube version to latest LTA version, will it help to optimize the DB size by changing the housekeping settings..? If yes what changes needs to be updated post update for branch analysis and pull request analysis.
Are we good to upgrade to any latest version from 9.9.1 LTA version in community build to reduce/optimize the DB size. If yes which version is suitable.
Moreover DB is size increasing very with below tables. Can you please let me know are we good to clean up any cache content from live_measures, file_sources, issues tables from DB. Please let me know if we are good to clean up the data from these tables…?