Fixes issue 32205: Deleting a line on the order line window takes long
authorArmaignac <collazoandy4@gmail.com>
Tue, 01 Aug 2017 11:59:06 -0400
changeset 32530 7107f4841d8d
parent 32529 5c0c3e9c06ff
child 32531 8cb1e05233d4
Fixes issue 32205: Deleting a line on the order line window takes long

Three new partial indexes were created to improve the performance on a huge
enviroment.
src-db/database/model/tables/C_ORDERLINE.xml
--- a/src-db/database/model/tables/C_ORDERLINE.xml	Thu Aug 03 16:48:09 2017 +0530
+++ b/src-db/database/model/tables/C_ORDERLINE.xml	Tue Aug 01 11:59:06 2017 -0400
@@ -380,6 +380,10 @@
       <foreign-key foreignTable="M_WAREHOUSE_RULE" name="C_ORDERLINE_WAREHOUSERULE">
         <reference local="M_WAREHOUSE_RULE_ID" foreign="M_WAREHOUSE_RULE_ID"/>
       </foreign-key>
+      <index name="C_ORDERLINE_BOMPARENT" unique="false">
+        <index-column name="BOM_PARENT_ID"/>
+        <whereClause><![CDATA[BOM_PARENT_ID IS NOT NULL]]></whereClause>
+      </index>
       <index name="C_ORDERLINE_C_RETURN_REASON" unique="false">
         <index-column name="C_RETURN_REASON_ID"/>
         <whereClause><![CDATA[C_RETURN_REASON_ID IS NOT NULL]]></whereClause>
@@ -394,6 +398,14 @@
       <index name="C_ORDERLINE_PRODUCT" unique="false">
         <index-column name="M_PRODUCT_ID"/>
       </index>
+      <index name="C_ORDERLINE_QUOTATIONLINE" unique="false">
+        <index-column name="QUOTATIONLINE_ID"/>
+        <whereClause><![CDATA[QUOTATIONLINE_ID IS NOT NULL]]></whereClause>
+      </index>
+      <index name="C_ORDERLINE_REFORDERLINE" unique="false">
+        <index-column name="REF_ORDERLINE_ID"/>
+        <whereClause><![CDATA[REF_ORDERLINE_ID IS NOT NULL]]></whereClause>
+      </index>
       <check name="C_ORDERLINE_CHECK1"><![CDATA[QUANTITYORDER IS NULL AND M_PRODUCT_UOM_ID IS NULL OR QUANTITYORDER IS NOT NULL AND M_PRODUCT_UOM_ID IS NOT NULL]]></check>
       <check name="C_ORDERLINE_CHECK2"><![CDATA[LINENETAMT = 0 OR C_TAX_ID IS NOT NULL]]></check>
       <check name="C_ORDERLINE_DIRECTSHIP_CHECK"><![CDATA[DIRECTSHIP IN ('Y', 'N')]]></check>