dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #03853
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1283: Improved performance in data analysis
------------------------------------------------------------
revno: 1283
committer: Lars Helge Oeverland <larshelge@xxxxxxxxx>
branch nick: trunk
timestamp: Thu 2009-12-24 08:36:44 +0100
message:
Improved performance in data analysis
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/jdbc/JdbcDataAnalysisStore.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription.
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/jdbc/JdbcDataAnalysisStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/jdbc/JdbcDataAnalysisStore.java 2009-12-23 18:55:58 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/jdbc/JdbcDataAnalysisStore.java 2009-12-24 07:36:44 +0000
@@ -108,14 +108,12 @@
{
final String sql =
"SELECT dv.dataelementid, dv.periodid, dv.sourceid, dv.categoryoptioncomboid, dv.value, dv.storedby, dv.lastupdated, " +
- "dv.comment, dv.followup, '" + lowerBound + "' AS minvalue, '" + upperBound + "' AS maxvalue, de.name AS dataelementname, " +
- "pe.startdate, pe.enddate, pt.name as periodtypename, ou.name AS sourcename, cc.categoryoptioncomboname " +
- "FROM datavalue AS dv " +
- "JOIN dataelement AS de USING (dataelementid) " +
+ "dv.comment, dv.followup, '" + lowerBound + "' AS minvalue, '" + upperBound + "' AS maxvalue, " +
+ "'" + dataElement.getName() + "' AS dataelementname, pe.startdate, pe.enddate, pt.name AS periodtypename, " +
+ "'" + organisationUnit.getName() + "' AS sourcename, cc.categoryoptioncomboname " +
+ "FROM datavalue AS dv " +
"JOIN period AS pe USING (periodid) " +
"JOIN periodtype AS pt USING (periodtypeid) " +
- "JOIN source AS sr USING (sourceid) " +
- "JOIN organisationunit AS ou ON ou.organisationunitid=sr.sourceid " +
"LEFT JOIN categoryoptioncomboname AS cc USING (categoryoptioncomboid) " +
"WHERE dv.dataelementid='" + dataElement.getId() + "' " +
"AND dv.categoryoptioncomboid='" + categoryOptionCombo.getId() + "' " +