src-db/database/model/tables/C_GLITEM_ACCT.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 C_GLITEM_ACCT">
    <table name="C_GLITEM_ACCT" primaryKey="C_GLITEM_ACCT_KEY">
      <column name="C_GLITEM_ACCT_ID" primaryKey="true" required="true" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault><![CDATA[get_uuid()]]></onCreateDefault>
      </column>
      <column name="C_GLITEM_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="C_ACCTSCHEMA_ID" primaryKey="false" 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="GLITEM_DEBIT_ACCT" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="GLITEM_CREDIT_ACCT" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <foreign-key foreignTable="AD_CLIENT" name="C_GLITEM_ACCT_AD_CLIENT">
        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="AD_ORG" name="C_GLITEM_ACCT_AD_ORG">
        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_ACCTSCHEMA" name="C_GLITEM_ACCT_C_ACCTSCHEMA" onDelete="cascade">
        <reference local="C_ACCTSCHEMA_ID" foreign="C_ACCTSCHEMA_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_GLITEM" name="C_GLITEM_ACCT_C_GLITEM">
        <reference local="C_GLITEM_ID" foreign="C_GLITEM_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_GLITEM_ACCT_GLITEM_CREDIT_AC">
        <reference local="GLITEM_CREDIT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_VALIDCOMBINATION" name="C_GLITEM_ACCT_GLITEM_DEBIT_ACC">
        <reference local="GLITEM_DEBIT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
      </foreign-key>
      <unique name="C_GLITEM_ACCT_GLITEM_ACCTSC_UN">
        <unique-column name="C_GLITEM_ID"/>
        <unique-column name="C_ACCTSCHEMA_ID"/>
      </unique>
      <check name="C_GLITEM_ACCT_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
    </table>
  </database>