From: Mark G. <mg...@us...> - 2004-04-23 15:33:01
|
Update of /cvsroot/gmod/apollo/src/java/apollo/dataadapter/chado/jdbc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1476/src/java/apollo/dataadapter/chado/jdbc Modified Files: JdbcChadoAdapter.java Log Message: Changed table order in from clause and now result query comes back instantly rather than one minute - kinda wacky but it works. Index: JdbcChadoAdapter.java =================================================================== RCS file: /cvsroot/gmod/apollo/src/java/apollo/dataadapter/chado/jdbc/JdbcChadoAdapter.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** JdbcChadoAdapter.java 22 Apr 2004 23:59:56 -0000 1.5 --- JdbcChadoAdapter.java 23 Apr 2004 15:32:53 -0000 1.6 *************** *** 777,780 **** --- 777,781 ---- // outer joins need to use ansi standard LEFT OUTER JOIN to jibe w postgres + // featureloc has to 1st in from clause - otherwise postgres chokes String sql = "\nSELECT f.uniquename, fl." + fminCol + " as query_fmin, fl." + fmaxCol + " as query_fmax, fl.strand as query_strand, " + "f2.feature_id as target_id, f2.uniquename as target, o2." + abbrevCol + " as target_species, " + *************** *** 783,788 **** "fl.residue_info as query_residue_info, fl2.residue_info as target_residue_info, cv.name as feature_type, " + "fp." + pvalCol + " as feature_prop, a.analysis_id " + ! "\tFROM feature f LEFT OUTER JOIN featureprop fp on (f.feature_id = fp.feature_id)," ! +"featureloc fl, cvterm cv, analysisfeature af, analysis a, " + "featureloc fl2, feature f2, organism o2/*, featureprop fp*/ " + "\t\tWHERE fl.srcfeature_id = " + srcSeqId + " " + --- 784,790 ---- "fl.residue_info as query_residue_info, fl2.residue_info as target_residue_info, cv.name as feature_type, " + "fp." + pvalCol + " as feature_prop, a.analysis_id " + ! "\tFROM featureloc fl, feature f LEFT OUTER JOIN featureprop fp " + ! "on (f.feature_id = fp.feature_id)," ! +" cvterm cv, analysisfeature af, analysis a, " + "featureloc fl2, feature f2, organism o2/*, featureprop fp*/ " + "\t\tWHERE fl.srcfeature_id = " + srcSeqId + " " + |