← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8429: Added index on messageconversation to enable postgres index only scan

 

------------------------------------------------------------
revno: 8429
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-10-08 15:58:22 +0200
message:
  Added index on messageconversation to enable postgres index only scan
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableCreator.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/startup/TableCreator.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableCreator.java	2012-08-29 15:41:35 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableCreator.java	2012-10-08 13:58:22 +0000
@@ -72,7 +72,8 @@
         createSilently( statementBuilder.getCreateDataSetCompletenessTable(), "aggregateddatasetcompleteness" );
         createSilently( statementBuilder.getCreateOrgUnitDataSetCompletenessTable(), "aggregatedorgunitdatasetcompleteness" );
         
-        createSilently( "CREATE INDEX datamart_crosstab ON datavalue ( dataelementid, categoryoptioncomboid, periodid )", "datamart_crosstab" );
+        createSilently( "CREATE INDEX datamart_crosstab ON datavalue (dataelementid, categoryoptioncomboid, periodid)", "datamart_crosstab" );
+        createSilently( "CREATE INDEX messageconversation_lastmessage ON messageconversation (lastmessage)", "messageconversation_lastmessage" );
         
         final String sqlDataValueArchive = 
             "CREATE TABLE datavaluearchive ( " +