src-db/database/model/tables/AD_ALERT.xml
author Armaignac <collazoandy4@gmail.com>
Thu, 05 Dec 2019 16:02:05 -0500
changeset 36865 15ea261d93f9
parent 36195 f455e5388bd2
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 AD_ALERT">
    <table name="AD_ALERT" primaryKey="AD_ALERT_KEY">
      <column name="AD_ALERT_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="DESCRIPTION" primaryKey="false" required="false" type="NVARCHAR" size="2000" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="AD_ALERTRULE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="AD_ROLE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="AD_USER_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="ISFIXED" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false">
        <default><![CDATA[N]]></default>
        <onCreateDefault/>
      </column>
      <column name="M_WAREHOUSE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="NOTE" primaryKey="false" required="false" type="VARCHAR" size="2000" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="RECORD_ID" primaryKey="false" required="false" type="VARCHAR" size="2000" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="REFERENCEKEY_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="STATUS" primaryKey="false" required="false" type="VARCHAR" size="60" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <foreign-key foreignTable="AD_ALERTRULE" name="AD_ALERT_AD_ALERTRULE" onDelete="cascade">
        <reference local="AD_ALERTRULE_ID" foreign="AD_ALERTRULE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="AD_CLIENT" name="AD_ALERT_AD_CLIENT">
        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="AD_ORG" name="AD_ALERT_AD_ORG">
        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
      </foreign-key>
      <foreign-key foreignTable="AD_ROLE" name="AD_ALERT_AD_ROLE">
        <reference local="AD_ROLE_ID" foreign="AD_ROLE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="AD_USER" name="AD_ALERT_AD_USER">
        <reference local="AD_USER_ID" foreign="AD_USER_ID"/>
      </foreign-key>
      <foreign-key foreignTable="M_WAREHOUSE" name="AD_ALERT_M_WAREHOUSE">
        <reference local="M_WAREHOUSE_ID" foreign="M_WAREHOUSE_ID"/>
      </foreign-key>
      <index name="AD_ALERT_RULE" unique="false">
        <index-column name="AD_ALERTRULE_ID"/>
      </index>
    </table>
  </database>