dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19717
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8720: Create indexes for columns to improve case aggregate query builder function.
------------------------------------------------------------
revno: 8720
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-10-26 09:37:46 +0700
message:
Create indexes for columns to improve case aggregate query builder function.
modified:
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.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-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java 2012-10-18 03:29:28 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java 2012-10-26 02:37:46 +0000
@@ -137,8 +137,12 @@
executeSql( "ALTER TABLE programstage DROP COLUMN stageinprogram" );
executeSql( "CREATE INDEX index_patientdatavalue ON patientdatavalue( programstageinstanceid, dataelementid, value, timestamp )" );
-
+ executeSql( "CREATE INDEX index_patientattributevalue ON patientattributevalue( patientattributeid, value )");
executeSql( "CREATE INDEX index_programinstance ON programinstance( programinstanceid )" );
+ executeSql( "CREATE INDEX index_patient_gender ON patient( patientid, gender " );
+ executeSql( "CREATE INDEX index_patient_registrationdate ON patient( patientid, registrationdate )" );
+ executeSql( "CREATE INDEX index_programinstance_enrollmentdate ON programinstance( programinstanceid, enrollmentdate )" );
+ executeSql( "CREATE INDEX index_programstageinstance_enrollmentdate ON programstageinstance( programstageinstanceid, executiondate )" );
executeSql( "ALTER TABLE program DROP COLUMN maxDaysAllowedInputData");