← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5777: Added util script

 

------------------------------------------------------------
revno: 5777
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2012-01-22 08:44:13 +0100
message:
  Added util script
added:
  resources/sql/recreate_datamart_indexes.sql


--
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
=== added file 'resources/sql/recreate_datamart_indexes.sql'
--- resources/sql/recreate_datamart_indexes.sql	1970-01-01 00:00:00 +0000
+++ resources/sql/recreate_datamart_indexes.sql	2012-01-22 07:44:13 +0000
@@ -0,0 +1,11 @@
+drop index aggregateddatavalue_index;
+drop index aggregatedindicatorvalue_index;
+drop index aggregateddatasetcompleteness_index;
+drop index aggregatedorgunitdatavalue_index;
+drop index aggregatedorgunitindicatorvalue_index;
+
+CREATE INDEX aggregateddatavalue_index ON aggregateddatavalue (dataelementid, categoryoptioncomboid, periodid, organisationunitid);
+CREATE INDEX aggregatedindicatorvalue_index ON aggregatedindicatorvalue (indicatorid, periodid, organisationunitid);
+CREATE INDEX aggregateddatasetcompleteness_index ON aggregateddatasetcompleteness (datasetid, periodid, organisationunitid);
+CREATE INDEX aggregatedorgunitdatavalue_index  ON aggregatedorgunitdatavalue (dataelementid, categoryoptioncomboid, periodid, organisationunitid, organisationunitgroupid);
+CREATE INDEX aggregatedorgunitindicatorvalue_index ON aggregatedorgunitindicatorvalue (indicatorid, periodid, organisationunitid, organisationunitgroupid);