src-db/database/model/tables/M_RAPPEL.xml
author Armaignac <collazoandy4@gmail.com>
Thu, 05 Dec 2019 16:02:05 -0500
changeset 36865 15ea261d93f9
parent 8505 a2bb7e6fb443
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 M_RAPPEL">
    <table name="M_RAPPEL" primaryKey="M_RAPPEL_KEY">
      <column name="M_RAPPEL_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="DESCRIPTION" primaryKey="false" required="false" type="NVARCHAR" size="255" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="C_CURRENCY_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="INCLUDE_PRODUCT" primaryKey="false" required="false" type="VARCHAR" size="60" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="INCLUDE_PRODUCT_CATEGORY" primaryKey="false" required="false" type="VARCHAR" size="60" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="SCALED" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <foreign-key foreignTable="AD_CLIENT" name="M_RAPPEL_AD_CLIENT">
        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="AD_ORG" name="M_RAPPEL_AD_ORG">
        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_CURRENCY" name="M_RAPPEL_C_CURRENCY">
        <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
      </foreign-key>
      <check name="M_RAPPEL_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
    </table>
  </database>