Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-4368

Highly improve performance of the project deletion operation

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.7
    • Component/s: Database
    • Labels:
      None

      Description

      Too many SQL requests are executed when deleting a project.

      For instance to delete a java project containing 1 package and 11 files this requires ... 406 SQL requests (see the attached log file).

      At first approximation we generate a SQL request for each pair of Sonar resources/Sonar tables which mean in our example :

      • Number of Sonar resources = 11 files + 1 package + 1 project + 4 unit test file = 17
      • Number of Sonar table to be purges = 22
      • Total number of SQL requests > 17 * 22 = 374

      In fact we should refactor the current mechanism to execute very few SQL request by table :

      • delete from graphs where resource_id in ?
      • instead of delete from graphs where resource_id=

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              henryju OLD - Julien HENRY
              Reporter:
              freddy.mallet Freddy Mallet (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: