Which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
Sonarqube 7.9.2 Enterprise Edition
Scanner version 126.96.36.1992
DB: Postgres v10.x (AWS RDS)
What are you trying to achieve
During the recent upgrade from v6.7.5 to v7.9.2, it was decided that we really needed to prune our SQ server and hence bringing the Postgres DB to a smaller size. Our current DB size is 164GB, this was only achieved by VACUUM FULL as the DB was at 250GB straight after upgrade. Here are the heavy tables in desc order:
relation | total_size
live_measures | 81 GB
file_sources | 66 GB
projects | 11 GB
issue_changes | 2455 MB
issues | 1703 MB
project_measures | 1333 MB
ce_activity | 100 MB
ce_scanner_context | 48 MB
snapshots | 26 MB
events | 25 MB
ce_task_characteristics | 13 MB
So, its apparent that live_measures and file_sources tables need to be pruned. Can you please shed some light as to what gets written in here? We have over 500 developers and over 300 active projects with over 15 different languages. Basically I am looking for a way to do some quick clean-up and then implement this an as automation to keep it clean and concise going forward.
Are there any automation scripts that already exist in order to do carry out house-keeping jobs?
What have you tried so far to achieve this
I have tried to understand the SQ DB structure and ploughing through Sonar community posts but I couldn’t find any.
Thank you in advance.