diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2016-10-27 18:42:59 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2016-10-28 14:53:26 +0200 |
commit | 808661b7a9c38770e02d2037062ca7fede475715 (patch) | |
tree | 33df9d9b03ffed9517d14e6725f34dcc49bb7139 /sonar-db | |
parent | f0e3b2f62a070961ba3fa053d42f006a8f8e1571 (diff) | |
download | sonarqube-808661b7a9c38770e02d2037062ca7fede475715.tar.gz sonarqube-808661b7a9c38770e02d2037062ca7fede475715.zip |
SONAR-8089 Remove useless join on snapshots in ComponentMapper#selectDescendants and selectChildren
Diffstat (limited to 'sonar-db')
-rw-r--r-- | sonar-db/src/main/resources/org/sonar/db/component/ComponentMapper.xml | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/sonar-db/src/main/resources/org/sonar/db/component/ComponentMapper.xml b/sonar-db/src/main/resources/org/sonar/db/component/ComponentMapper.xml index 383175c492e..52dd7c88206 100644 --- a/sonar-db/src/main/resources/org/sonar/db/component/ComponentMapper.xml +++ b/sonar-db/src/main/resources/org/sonar/db/component/ComponentMapper.xml @@ -346,12 +346,9 @@ <sql id="sqlChildren"> from projects p - inner join projects base on base.project_uuid = p.project_uuid - inner join snapshots s on s.component_uuid = base.project_uuid + inner join projects base on base.project_uuid = p.project_uuid and base.uuid = #{query.baseUuid} where - base.uuid = #{query.baseUuid} - and p.enabled = ${_true} - and s.islast = ${_true} + p.enabled = ${_true} and p.uuid_path = #{baseUuidPath} <include refid="sqlTreeFilters"/> </sql> @@ -397,13 +394,10 @@ <sql id="sqlDescendants"> from projects p - inner join projects base on base.project_uuid=p.project_uuid - inner join snapshots s on s.component_uuid = base.project_uuid + inner join projects base on base.project_uuid=p.project_uuid and base.uuid = #{query.baseUuid} where - base.uuid = #{query.baseUuid} - and p.enabled = ${_true} + p.enabled = ${_true} and p.uuid_path like #{baseUuidPathLike} ESCAPE '/' - and s.islast = ${_true} <include refid="sqlTreeFilters"/> </sql> |