Sonarqube version upgrade from 5.6.6 to 6.7.6

Hello Team,

We are planning to upgrade Sonarqube version from 5.6.6 to 6.7.6 and we could see drastic increase in behaviour of project_measures values in database which is causing issue to upgrade the sonarqube version. It would be really helpful if you can share the steps to optimize the database table to complete our Sonarqube upgrade successfully.

We have observered up sonarqube upgrade is getting success project_measures with this value in 30000.00

mysql> SELECT table_name AS Table,round(((data_length + index_length) / 1024 / 1024), 2) Size in MB FROM information_schema.TABLES WHERE table_schema = ‘sonar_proddn1’;
±--------------------------±-----------+
| Table | Size in MB |
±--------------------------±-----------+
| active_dashboards | 0.08 |
| active_rule_parameters | 0.09 |
| active_rules | 1.98 |
| activities | 11.03 |
| authors | 0.03 |
| ce_activity | 21.27 |
| ce_queue | 0.05 |
| dashboards | 0.02 |
| duplications_index | 0.05 |
| events | 7.20 |
| file_sources | 4788.61 |
| group_roles | 1.42 |
| groups | 0.02 |
| groups_users | 0.39 |
| issue_changes | 842.58 |
| issue_filter_favourites | 0.03 |
| issue_filters | 0.03 |
| issues | 3043.02 |
| loaded_templates | 0.02 |
| manual_measures | 0.03 |
| measure_filter_favourites | 0.03 |
| measure_filters | 0.11 |
| metrics | 0.08 |
| notifications | 0.02 |
| perm_templates_groups | 0.02 |
| perm_templates_users | 0.02 |
| permission_templates | 0.02 |
| project_links | 0.28 |
| project_measures | 50068.00 |
| project_qprofiles | 0.16 |
| projects | 615.72 |
| properties | 0.23 |
| quality_gate_conditions | 0.02 |
| quality_gates | 0.03 |
| resource_index | 994.28 |
| rules | 4.88 |
| rules_parameters | 0.16 |
| rules_profiles | 0.03 |
| schema_migrations | 0.02 |
| snapshots | 1315.72 |

Hi,

There is no optimization of this table; the database should be treated like a black box. Any manual interventions you make mean that you’re likely to have problems with future upgrades.

Would you might taking a step back and sharing why you felt the need to investigate at the DB table level?

 
Thx,
Ann

HI Ann,
I am part of Jenifer team we are suspecting Db as an optimization because we could see project_measures consumes large space on a day to day basis.

And also kindly confirm to optimize the sonarqube to reduce the space.

Hi,

We’ve already optimized the database. :slight_smile:

If you must reduce overall size (rather than adding disk capacity - after all, why not? Disk is cheap!), consider adjusting your housekeeping settings to retain fewer old analyses or cleaning out projects that are no longer under development.

 
Ann