This is an automated email from the ASF dual-hosted git repository.
adamsaghy pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git
The following commit(s) were added to refs/heads/develop by this push:
new 749a77efa FINERACT-1724: Improve CoB performance by indices
749a77efa is described below
commit 749a77efac60703168acb59dd99037d0d1edf71b
Author: abraham.menyhart <[email protected]>
AuthorDate: Wed Jul 5 11:05:58 2023 +0200
FINERACT-1724: Improve CoB performance by indices
---
.../db/changelog/tenant/changelog-tenant.xml | 1 +
.../tenant/parts/0114_create_cob_indices.xml | 92 ++++++++++++++++++++++
2 files changed, 93 insertions(+)
diff --git
a/fineract-provider/src/main/resources/db/changelog/tenant/changelog-tenant.xml
b/fineract-provider/src/main/resources/db/changelog/tenant/changelog-tenant.xml
index fb32737eb..c57cf5c3d 100644
---
a/fineract-provider/src/main/resources/db/changelog/tenant/changelog-tenant.xml
+++
b/fineract-provider/src/main/resources/db/changelog/tenant/changelog-tenant.xml
@@ -133,4 +133,5 @@
<include file="parts/0111_transaction_summary_with_asset_owner.xml"
relativeToChangelogFile="true" />
<include
file="parts/0112_transaction_summary_with_asset_owner_change_report_sql.xml"
relativeToChangelogFile="true" />
<include
file="parts/0113_transaction_summary_with_asset_owner_report_sql_fix.xml"
relativeToChangelogFile="true" />
+ <include file="parts/0114_create_cob_indices.xml"
relativeToChangelogFile="true" />
</databaseChangeLog>
diff --git
a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0114_create_cob_indices.xml
b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0114_create_cob_indices.xml
new file mode 100644
index 000000000..0e59750d4
--- /dev/null
+++
b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0114_create_cob_indices.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd">
+ <changeSet author="fineract" id="1" runInTransaction="false"
context="postgresql">
+ <preConditions onFail="MARK_RAN">
+ <not>
+ <indexExists tableName="batch_step_execution"
columnNames="job_execution_id, step_name, start_time"/>
+ </not>
+ </preConditions>
+ <sql>
+ create index concurrently
idx_batch_step_execution_step_name_job_execution_id on
batch_step_execution(job_execution_id, step_name, start_time);
+ </sql>
+ </changeSet>
+
+ <changeSet author="fineract" id="2" runInTransaction="false"
context="postgresql">
+ <preConditions onFail="MARK_RAN">
+ <not>
+ <indexExists tableName="batch_job_execution"
columnNames="job_execution_id"/>
+ </not>
+ </preConditions>
+ <sql>
+ create index concurrently idx_batch_job_execution_job_execution_id
on batch_job_execution(job_execution_id);
+ </sql>
+ </changeSet>
+
+ <changeSet author="fineract" id="3" runInTransaction="false"
context="postgresql">
+ <preConditions onFail="MARK_RAN">
+ <not>
+ <indexExists tableName="batch_job_execution"
columnNames="job_instance_id"/>
+ </not>
+ </preConditions>
+ <sql>
+ create index concurrently idx_batch_job_execution_job_instance_id
on batch_job_execution(job_instance_id);
+ </sql>
+ </changeSet>
+
+ <changeSet author="fineract" id="1" runInTransaction="false"
context="mysql">
+ <preConditions onFail="MARK_RAN">
+ <not>
+ <indexExists tableName="BATCH_STEP_EXECUTION"
columnNames="JOB_EXECUTION_ID, STEP_NAME, START_TIME"/>
+ </not>
+ </preConditions>
+ <createIndex
indexName="IDX_BATCH_STEP_EXECUTION_STEP_NAME_JOB_EXECUTION_ID"
tableName="BATCH_STEP_EXECUTION">
+ <column name="JOB_EXECUTION_ID"/>
+ <column name="STEP_NAME"/>
+ <column name="START_TIME"/>
+ </createIndex>
+ </changeSet>
+
+ <changeSet author="fineract" id="2" runInTransaction="false"
context="mysql">
+ <preConditions onFail="MARK_RAN">
+ <not>
+ <indexExists tableName="BATCH_JOB_EXECUTION"
columnNames="JOB_EXECUTION_ID"/>
+ </not>
+ </preConditions>
+ <createIndex indexName="IDX_BATCH_JOB_EXECUTION_JOB_EXECUTION_ID"
tableName="BATCH_JOB_EXECUTION">
+ <column name="JOB_EXECUTION_ID"/>
+ </createIndex>
+ </changeSet>
+
+ <changeSet author="fineract" id="3" runInTransaction="false"
context="mysql">
+ <preConditions onFail="MARK_RAN">
+ <not>
+ <indexExists tableName="BATCH_JOB_EXECUTION"
columnNames="JOB_INSTANCE_ID"/>
+ </not>
+ </preConditions>
+ <createIndex indexName="IDX_BATCH_JOB_EXECUTION_JOB_INSTANCE_ID"
tableName="BATCH_JOB_EXECUTION">
+ <column name="JOB_INSTANCE_ID"/>
+ </createIndex>
+ </changeSet>
+</databaseChangeLog>