如何维护 Sonar 的清理 table PROJECT_MEASURES

How to maintain cleanup of the Sonar table PROJECT_MEASURES

我们有 Sonarqube 版本 6.7.1,带有 Oracle DB。我们看到 table PROJECT_MEASURES 充满了大量的记录:130216515。 在那里保持清洁的最佳方法是什么?目前,由于 Sonarqube

超时,它导致作业中出现许多失败

示例从今天 12:15 到 12:30:

430,574 rows were inserted to that table, 1,300,848 were deleted.

正如我们所怀疑的那样,问题来自 PROJECT_MEASURES 糟糕的表现。 我们改进它的步骤:

  1. A new index was added to the table for ANALYSIS_UUID_CUSTOM_IDX2
  2. Afterward, rebuild the indexes
  3. db-cache was 300MB, where the minimum we allocated was 2GB. We increased it to 4GB (the DB server has 16GB RAM)
  4. Redologs files – size was 300MB, we increased to 1GB
  5. Increase the cache of the sequence from the default 20 to 1000
  6. Shrink the PROJECT_MEASURES table with the COMPACT option

在它之后,扫描工作得更快,并且所有构建都通过了 sonarqube 阶段