From e84d128c9dcea753ba9413f9dba70433198605c6 Mon Sep 17 00:00:00 2001 From: kaloyane <kaloyane> Date: Wed, 28 Sep 2011 13:33:12 +0000 Subject: [PATCH] [LMS-2538] query for selecting relevant analysis procedures sped up SVN: 23138 --- .../screening/server/dataaccess/IScreeningQuery.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/dataaccess/IScreeningQuery.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/dataaccess/IScreeningQuery.java index f6962356656..27f8d3851aa 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/dataaccess/IScreeningQuery.java +++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/dataaccess/IScreeningQuery.java @@ -310,17 +310,14 @@ public interface IScreeningQuery extends BaseQuery + " ds_props.value as analysisProcedure, ds_type.code as datasetTypeCode" + " from experiments exp " + " join data ds on ds.expe_id = exp.id " + + " join samples plate on plate.id = ds.samp_id " + + " join samples well on well.samp_id_part_of = plate.id " + " join data_set_types ds_type on ds.dsty_id = ds_type.id " + " join data_set_type_property_types dst_pt on dst_pt.dsty_id = ds_type.id " + " left outer join data_set_properties ds_props on ds_props.ds_id = ds.id and ds_props.dstpt_id = dst_pt.id" + " where " + " dst_pt.prty_id = (select id from property_types where code='ANALYSIS_PROCEDURE' and is_internal_namespace=true)"; - final static String AT_LEAST_ONE_WELL_EXISTS = "EXISTS (select wells.id " - + " from samples wells " - + " join samples plates on wells.samp_id_part_of = plates.id " - + " where plates.id = ds.samp_id) "; - @Select(sql = ANALYSIS_PROCEDURE_SELECT) public List<AnalysisProcedureResult> listAllAnalysisProcedures(); -- GitLab