FINERACT-1724: Improve CoB performance by indices
This commit is contained in:
committed by
Adam Saghy
parent
9c3393394e
commit
749a77efac
@@ -133,4 +133,5 @@
|
|||||||
<include file="parts/0111_transaction_summary_with_asset_owner.xml" relativeToChangelogFile="true" />
|
<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/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/0113_transaction_summary_with_asset_owner_report_sql_fix.xml" relativeToChangelogFile="true" />
|
||||||
|
<include file="parts/0114_create_cob_indices.xml" relativeToChangelogFile="true" />
|
||||||
</databaseChangeLog>
|
</databaseChangeLog>
|
||||||
|
|||||||
+92
@@ -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>
|
||||||
Reference in New Issue
Block a user