diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2012-10-10 12:13:51 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2012-10-10 12:13:51 +0200 |
commit | ad7276f733b8c2c4a302cf15e2915c4c04541857 (patch) | |
tree | 27602e508c68488ec6d9074b49e7ea6399162eb7 | |
parent | 4eb0a2ddd8cf47489b8432d2b018642f1af42c85 (diff) | |
download | sonarqube-ad7276f733b8c2c4a302cf15e2915c4c04541857.tar.gz sonarqube-ad7276f733b8c2c4a302cf15e2915c4c04541857.zip |
Fix performance of profile console
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/models/profile.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/profile.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/profile.rb index 0a5cb171b78..7b39feb9615 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/profile.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/profile.rb @@ -179,7 +179,8 @@ class Profile < ActiveRecord::Base @projects ||= begin Project.find(:all, - :conditions => ['id in (select prop.resource_id from properties prop where prop.resource_id is not null and prop.prop_key=? and prop.text_value like ?)', "sonar.profile.#{language}", name]) + :joins => 'LEFT JOIN properties ON properties.resource_id = projects.id', + :conditions => ['properties.resource_id is not null and properties.prop_key=? and properties.text_value like ?', "sonar.profile.#{language}", name]) end end |