From f3699eb3c5a509b050cdbc38536d93c2fdc5ee42 Mon Sep 17 00:00:00 2001
From: tjc <tjc@ee4ac58c-ac51-4696-9907-e4b3aa274f04>
Date: Thu, 25 Sep 2008 14:59:29 +0000
Subject: [PATCH] optimise getResidueFeatures

git-svn-id: svn+ssh://svn.internal.sanger.ac.uk/repos/svn/pathsoft/artemis/trunk@8894 ee4ac58c-ac51-4696-9907-e4b3aa274f04
---
 artemis_sqlmap/Feature.xml | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/artemis_sqlmap/Feature.xml b/artemis_sqlmap/Feature.xml
index e010f6fd1..52e62773e 100644
--- a/artemis_sqlmap/Feature.xml
+++ b/artemis_sqlmap/Feature.xml
@@ -454,9 +454,10 @@
 	LEFT JOIN feature ON cvterm.cvterm_id=feature.type_id 
 	LEFT JOIN organism ON organism.organism_id=feature.organism_id 
 	WHERE <isNotNull> feature.organism_id=$value$ AND </isNotNull>
+	  residues notnull AND residues != '' AND
 	  ( cvterm.name LIKE '%chromosome%' OR cvterm.name LIKE '%sequence%' OR 
 	    cvterm.name IN ('supercontig', 'ultra_scaffold', 'golden_path_region', 'contig') ) 
-	AND residues notnull AND residues != '' ORDER BY common_name
+	ORDER BY common_name
   </select>
 	
   <select id="getResidueFeaturesByOrganismCommonName" parameterClass="java.lang.String"
@@ -467,9 +468,10 @@
 	LEFT JOIN feature ON cvterm.cvterm_id=feature.type_id 
 	LEFT JOIN organism ON organism.organism_id=feature.organism_id 
 	WHERE <isNotNull> organism.common_name=#value# AND </isNotNull>
+	  residues notnull AND residues != '' AND
 	  ( cvterm.name LIKE '%chromosome%' OR cvterm.name LIKE '%sequence%' OR 
 	    cvterm.name IN ('supercontig', 'ultra_scaffold', 'golden_path_region', 'contig') ) 
-	AND residues notnull AND residues != '' ORDER BY common_name	  
+	ORDER BY common_name	  
   </select>
   
 		
-- 
GitLab