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

Fix SQL requests of the measure filter service on Oracle when more than 1000 elements

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.5
    • Component/s: Measures
    • Labels:
      None

      Description

      Currently, the measure filter service is executing a first SQL query in Java (to get the list of components) and then the rest is done on Rails side, most notably:

      SELECT * FROM `snapshots` WHERE id in (.....)
      
      SELECT * FROM `projects` WHERE (`projects`.`id` IN (...) OR `projects`.`id` IN (...) OR .....)
      
      SELECT * FROM `project_measures` WHERE (rule_priority is null and rule_id is null and characteristic_id is null and person_id is null and snapshot_id in (....) and metric_id in (....))
      

      We have to fix queries on snapshots and project_measures to split in (...) in group of max 1000 elements.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              julien.lancelot Julien Lancelot
              Reporter:
              fabemn OLD - Fabrice Bellingard
              Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: