Database usage only growing

Hello everybody,

We are having trouble with a growing Oracle DB after upgrading/ migrating a SonarQube 5.0 installation. We had to double the tablespace size (1 GB -> 2 GB). A single run of an XL Java project added 160 MB.

Maybe the added usage can be explained with the new “Live Measures” feature.

Still,

  • housekeeping
  • deleting activities and even
  • deleting whole projects

did not result in a reduction of DB space usage (looking at BYTES of the DBA_SEGMENTS view).

I would be very glad to hear from one of you what we could do to understand this behaviour.

Thank you so much!

Regards,
Björn

Hi,

If you upgraded to a version lower than 7.2, then you may face https://jira.sonarsource.com/browse/SONAR-10658. Is that the case?
See https://stackoverflow.com/questions/50249030/sonarqube-very-big-database/50268841#50268841 for more details.

Thank you very much for replying to my question.

Regarding the issue SONAR-10658: No. Our largest DB objects are:

PROJECT_MEASURES	TABLE	272
LIVE_MEASURES	TABLE	224
SYS_LOB0000041704C00004$$	LOBSEGMENT	192
LIVE_MEASURES_COMPONENT	INDEX	112
MEASURES_COMPONENT_UUID	INDEX	104
LIVE_MEASURES_PROJECT	INDEX	104
SYS_LOB0000041704C00009$$	LOBSEGMENT	88
PK_LIVE_MEASURES	INDEX	88
MEASURES_ANALYSIS_METRIC	INDEX	80
FILE_SOURCES	TABLE	80

(We noticed the new and big tables/ indices named LIVE_MEASURES.)

As far as I know there is no “VACUUM” command for Oracle. The sizes of DB objects seem to no longer grow after the large increase right after updating/ migrating SonarQube to 7.1.

The DB size is roughly 2 GB for 900k LoC (Java) and a history of below 3 years (keeping around 50 analysis records for each of the 5 projects). Is the DB size reasonable?

Versions 5.0 and 7.1 can’t be compared in terms of database size. New features have been introduced.

It’s hard to provide an estimation of expected size. There are too many parameters to take into account. I would say that yes, this size sounds good.

Thank you so much for supporting us. :grinning: