src-db/database/model/tables/MA_PROCESS.xml
author Armaignac <collazoandy4@gmail.com>
Thu, 05 Dec 2019 16:02:05 -0500
changeset 36865 15ea261d93f9
parent 31556 a6db92f321b6
permissions -rw-r--r--
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
<?xml version="1.0"?>
  <database name="TABLE MA_PROCESS">
    <table name="MA_PROCESS" primaryKey="MA_PROCESS_KEY">
      <column name="MA_PROCESS_ID" primaryKey="true" required="true" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="AD_CLIENT_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="AD_ORG_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="ISACTIVE" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
        <default><![CDATA[Y]]></default>
        <onCreateDefault/>
      </column>
      <column name="CREATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false">
        <default><![CDATA[SYSDATE]]></default>
        <onCreateDefault/>
      </column>
      <column name="CREATEDBY" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="UPDATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false">
        <default><![CDATA[SYSDATE]]></default>
        <onCreateDefault/>
      </column>
      <column name="UPDATEDBY" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="NAME" primaryKey="false" required="true" type="NVARCHAR" size="60" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="VALUE" primaryKey="false" required="true" type="NVARCHAR" size="40" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="MA_WORKSTATION_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="DESCRIPTION" primaryKey="false" required="false" type="NVARCHAR" size="255" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="MA_COSTCENTER_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <foreign-key foreignTable="AD_ORG" name="AD_ORG_MAPROCESS">
        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
      </foreign-key>
      <foreign-key foreignTable="MA_COSTCENTER" name="MA_COSTCENTER_MAPROCESS">
        <reference local="MA_COSTCENTER_ID" foreign="MA_COSTCENTER_ID"/>
      </foreign-key>
      <foreign-key foreignTable="AD_CLIENT" name="MA_PROCESS_AD_CLIENT">
        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="MA_WORKSTATION" name="MA_WORKSTATION_MAPROCESS">
        <reference local="MA_WORKSTATION_ID" foreign="MA_WORKSTATION_ID"/>
      </foreign-key>
      <index name="MA_PROCESS_WORKSTATION_IDX" unique="false">
        <index-column name="MA_WORKSTATION_ID"/>
        <whereClause><![CDATA[MA_WORKSTATION_ID IS NOT NULL]]></whereClause>
      </index>
      <check name="MA_PROCESS_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
    </table>
  </database>