summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2022-03-23 18:05:48 +0000
committerGerrit Code Review <gerrit@onap.org>2022-03-23 18:05:48 +0000
commit3d209fa57d456a383b161759c6534d55c5a8e01c (patch)
tree69cdca6e4bd87c5f7f36526297636434baa567dd /ms/blueprintsprocessor
parent39f021c69905091b62add58dfdceff67396b87bc (diff)
parent7d22c554d8aad6ed517ead3d0ed8e6ace3fbb66d (diff)
Merge "Add indexes to Template/Resource resolution"
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 {