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

Potential big performance hotspot just after the "Apply project exclusions" step during an analysis

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 5.0, 5.1
    • Fix Version/s: None
    • Component/s: Scanner
    • Labels:

      Description

      Due to the following line of code, for each source file to be analysed the bellow SQL request is executed. For some users, the execution time of this SQL request might be a matter of seconds and so the overall execution time of this step might be a matter of minutes/hours. So far, this issue has been faced only by users using either Oracle or SQLServer DB (SQL Server 2012 with jTds driver).

      SELECT metric1_.name AS col_0_0_,
               measuremod0_.id AS col_1_0_,
               measuremod0_.id AS id5_,
               measuremod0_.alert_status AS alert2_5_,
               measuremod0_.alert_text AS alert3_5_,
               measuremod0_.characteristic_id AS characte4_5_,
               measuremod0_.measure_data AS measure5_5_,
               measuremod0_.description AS descript6_5_,
               measuremod0_.metric_id AS metric7_5_,
               measuremod0_.person_id AS person8_5_,
               measuremod0_.project_id AS project9_5_,
               measuremod0_.rule_id AS rule10_5_,
               measuremod0_.rule_priority AS rule11_5_,
               measuremod0_.snapshot_id AS snapshot12_5_,
               measuremod0_.tendency AS tendency5_,
               measuremod0_.text_value AS text14_5_,
               measuremod0_.url AS url5_,
               measuremod0_.VALUE AS value5_,
               measuremod0_.variation_value_1 AS variation17_5_,
               measuremod0_.variation_value_2 AS variation18_5_,
               measuremod0_.variation_value_3 AS variation19_5_,
               measuremod0_.variation_value_4 AS variation20_5_,
               measuremod0_.variation_value_5 AS variation21_5_
          FROM project_measures measuremod0_,
               metrics metric1_,
               projects resourcemo2_,
               snapshots snapshot3_
         WHERE     metric1_.id = measuremod0_.metric_id
               AND measuremod0_.snapshot_id = snapshot3_.id
               AND snapshot3_.project_id = resourcemo2_.id
               AND resourcemo2_.kee = :1
               AND snapshot3_.status = :2
               AND snapshot3_.qualifier <> :3
               AND (measuremod0_.characteristic_id IS NULL)
               AND (measuremod0_.person_id IS NULL)
               AND (measuremod0_.rule_id IS NULL)
               AND (measuremod0_.rule_priority IS NULL)
               AND (metric1_.name IN ( :4, :5, :6))
               AND snapshot3_.islast = 1
      ORDER BY snapshot3_.created_at
      

      Relating community issues:

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              freddy.mallet Freddy Mallet (Inactive)
              Reporter:
              freddy.mallet Freddy Mallet (Inactive)
              Votes:
              7 Vote for this issue
              Watchers:
              14 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: