summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor
diff options
context:
space:
mode:
authorOleg Mitsura <oleg.mitsura@amdocs.com>2022-03-23 13:14:05 -0400
committerOleg Mitsura <oleg.mitsura@amdocs.com>2022-03-23 13:15:35 -0400
commit7d22c554d8aad6ed517ead3d0ed8e6ace3fbb66d (patch)
tree4ecb2545ba0d27891322dea7874968dff1bb7e39 /ms/blueprintsprocessor
parent172ec820e0e8d2ea1541301250ae3d9404e5caae (diff)
Add indexes to Template/Resource resolution
Issue-ID: CCSDK-3611 Signed-off-by: Oleg Mitsura <oleg.mitsura@amdocs.com> Change-Id: I7e761a3a7bd6a107748a4d90d3a335ebf77a759b
Diffstat (limited to 'ms/blueprintsprocessor')
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolution.kt9
-rwxr-xr-xms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolution.kt8
2 files changed, 15 insertions, 2 deletions
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolution.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolution.kt
index 8f3e5175e..40a447d8b 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolution.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolution.kt
@@ -27,6 +27,7 @@ import javax.persistence.Column
import javax.persistence.Entity
import javax.persistence.EntityListeners
import javax.persistence.Id
+import javax.persistence.Index
import javax.persistence.Lob
import javax.persistence.Table
import javax.persistence.Temporal
@@ -34,7 +35,13 @@ import javax.persistence.TemporalType
@EntityListeners(AuditingEntityListener::class)
@Entity
-@Table(name = "RESOURCE_RESOLUTION")
+@Table(name = "RESOURCE_RESOLUTION",
+indexes = [Index(name = "idx_rr_bpnameversion", columnList = "blueprint_name, blueprint_version"),
+ Index(name = "idx_rr_resolution_key", columnList = "resolution_key"),
+ Index(name = "idx_rr_name", columnList = "name"),
+ Index(name = "idx_rr_artifact_name", columnList = "artifact_name"),
+ Index(name = "idx_rr_resource_idtype", columnList = "resource_id, resource_type")
+])
@Proxy(lazy = false)
class ResourceResolution : Serializable {
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolution.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolution.kt
index a53e901fd..46e0d4569 100755
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolution.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolution.kt
@@ -27,6 +27,7 @@ import javax.persistence.Column
import javax.persistence.Entity
import javax.persistence.EntityListeners
import javax.persistence.Id
+import javax.persistence.Index
import javax.persistence.Lob
import javax.persistence.Table
import javax.persistence.Temporal
@@ -34,7 +35,12 @@ import javax.persistence.TemporalType
@EntityListeners(AuditingEntityListener::class)
@Entity
-@Table(name = "TEMPLATE_RESOLUTION")
+@Table(name = "TEMPLATE_RESOLUTION", indexes = [
+ Index(name = "idx_tr_bpnameversion", columnList = "blueprint_name, blueprint_version"),
+ Index(name = "idx_tr_resource_idtype", columnList = "resource_id, resource_type"),
+ Index(name = "idx_tr_artifact_name", columnList = "artifact_name"),
+ Index(name = "idx_tr_resolution_key", columnList = "resolution_key")
+])
@Proxy(lazy = false)
class TemplateResolution : Serializable {