← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20916: Added index to keyjsonvalue on namespace, key to improve performance in lookups

 

------------------------------------------------------------
revno: 20916
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2015-11-01 23:09:00 -0500
message:
  Added index to keyjsonvalue on namespace, key to improve performance in lookups
modified:
  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/resources/org/hisp/dhis/keyjsonvalue/hibernate/KeyJsonValue.hbm.xml


--
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	2015-08-30 14:21:41 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableCreator.java	2015-11-02 04:09:00 +0000
@@ -58,6 +58,7 @@
     {        
         createSilently( "create unique index dataapproval_unique on dataapproval(datasetid,periodid,organisationunitid,attributeoptioncomboid,dataapprovallevelid)", "dataapproval_unique" );
         createSilently( "create index in_datavalueaudit on datavalueaudit(dataelementid,periodid,organisationunitid,categoryoptioncomboid,attributeoptioncomboid)", "in_datavalueaudit" );
+        createSilently( "create index in_keyjsonvalue_namespace_key on keyjsonvalue(namespace, key)", "in_keyjsonvalue_namespace_key" );
     }
     
     private void createSilently( final String sql, final String name )

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/keyjsonvalue/hibernate/KeyJsonValue.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/keyjsonvalue/hibernate/KeyJsonValue.hbm.xml	2015-11-02 03:56:18 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/keyjsonvalue/hibernate/KeyJsonValue.hbm.xml	2015-11-02 04:09:00 +0000
@@ -12,7 +12,6 @@
         <id name="id" column="keyjsonvalueid">
             <generator class="native"/>
         </id>
-
         &identifiableProperties;
 
         <property name="namespace" column="namespace" type="string" length="255" not-null="true" unique-key="keyjsonvalue_unique_key_in_namespace"/>