SonarQube database re-indexing

Hi Team,

We are using SonarQube CE 9.9 version with ECS and RDS PSQL 13.10 version. Re-indexing of Database is not yet performed in our Database. This is the first time we are looking into it.
We would like to know how to perform this reindexing in the PSQL.
Checked this Official Document

Can we follow the same commands and also, do we need to stop the SonarQube application while performing this action.
Our total Database Size is 165 GB, any approximate time how much time this will take to complete.

Also, in our sonar.properties we have only this options currently, please suggest us if we need to modify/update the values or properties.

sonar.web.javaOpts=-Xmx2999m
sonar.ce.javaOpts=-Xmx2998m
sonar.search.javaOpts=-Xmx2997m -Xms2997m
#
sonar.web.javaAdditionalOpts=-javaagent:/opt/sonarqube/extensions/plugins/sonarqube-community-branch-plugin-1.14.0.jar=web
sonar.ce.javaAdditionalOpts=-javaagent:/opt/sonarqube/extensions/plugins/sonarqube-community-branch-plugin-1.14.0.jar=ce


sonar.search.javaAdditionalOpts=-Dlog4j2.formatMsgNoLookups=true

Ec2 machine which is running the SonarQube docker is of type m6i.2xlarge, if we need to update the instance type also kindly suggest.

@ganncamp @Colin

Hey there.

Yes, that’s why they’re in the documentation!

It’s not strictly necessary.

The best folks to ask are your DBAs – that’s something we can’t tell you.

Generally, these don’t need to be updated at all unless you have a specific need. What led you to these values in the first place?

Yes, that’s why they’re in the documentation!

While we performing the Vacuum full database, it was getting the table lock actually, then we have tried executing the vacuum, reindex and Analyse commands against each table name instead of Database name.

It’s not strictly necessary.

Why we asked this question, since we are little afraid will there be any chances getting table lock.
Also want to check, whether its mandatory to perform this Vacuum, reindex and Analyse commands after every upgrade or can we perform 3 months 1 once or something like that?

The best folks to ask are your DBAs – that’s something we can’t tell you.

Its okay, thanks :slight_smile:

Generally, these don’t need to be updated at all unless you have a specific need. What led you to these values in the first place?

Why this was asked since the sonar.properties was having only plugin details. Sonar application was running in default values with 512MB.

Actually, we were facing this issue, and we were not knowing about this issue, currently we have fixed this issue by upgrading to 9.9.1 and 9.9.2.

See the Postgres documentation on Routine Database Maintenance Tasks