Fixes BUG-42426: Financial account window performance for LASTRECON and
authorArmaignac <collazoandy4@gmail.com>
Thu, 05 Dec 2019 16:02:05 -0500
changeset 36865 15ea261d93f9
parent 36864 6429eb7973ab
child 36866 f385f3e59799
Fixes BUG 42426: Financial account window performance for LASTRECON and
APRM_LASTREC auxiliary inputs

The perfomance for LASTRECON and APRM_LASTREC auxiliary inputs is bad with high
volume of records in fin_reconciliation window because a sequence scan is made
while filtering by created

A new Index for created and fin_financial_account_id columns was created in
fin_reconciliation table
src-db/database/model/tables/FIN_RECONCILIATION.xml
--- a/src-db/database/model/tables/FIN_RECONCILIATION.xml	Thu Dec 12 12:10:47 2019 +0100
+++ b/src-db/database/model/tables/FIN_RECONCILIATION.xml	Thu Dec 05 16:02:05 2019 -0500
@@ -97,6 +97,10 @@
       <foreign-key foreignTable="FIN_FINANCIAL_ACCOUNT" name="FIN_RECONCIL_FINFINANCIALACC">
         <reference local="FIN_FINANCIAL_ACCOUNT_ID" foreign="FIN_FINANCIAL_ACCOUNT_ID"/>
       </foreign-key>
+      <index name="FIN_RECONCILE_CREATED_FINACC" unique="false">
+        <index-column name="CREATED"/>
+        <index-column name="FIN_FINANCIAL_ACCOUNT_ID"/>
+      </index>
       <index name="FIN_RECONCILE_FINACCOUNT" unique="false">
         <index-column name="FIN_FINANCIAL_ACCOUNT_ID"/>
       </index>