Fixes issue 37885:Performance issue in Physical Inventory when deleting a record
authorMark <markmm82@gmail.com>
Fri, 16 Feb 2018 13:08:17 -0500
changeset 33546 72f923b76be5
parent 33545 a959a97929c7
child 33547 c4ccb5d59890
child 33600 921b528def59
Fixes issue 37885:Performance issue in Physical Inventory when deleting a record
with too many lines

To improve the performance when deleting inventory records with too many lines was
added a new index on RELATEDINVENTORYLINEID column of M_INVENTORYLINE_INVENTORYLINE
table for those not null
src-db/database/model/tables/M_INVENTORYLINE.xml
--- a/src-db/database/model/tables/M_INVENTORYLINE.xml	Wed Feb 21 10:20:19 2018 -0500
+++ b/src-db/database/model/tables/M_INVENTORYLINE.xml	Fri Feb 16 13:08:17 2018 -0500
@@ -119,6 +119,10 @@
       <index name="M_INVENTORYLINE_INVENTORY" unique="false">
         <index-column name="M_INVENTORY_ID"/>
       </index>
+      <index name="M_INVENTORYLINE_INVENTORYLINE" unique="false">
+        <index-column name="RELATEDINVENTORYLINEID"/>
+        <whereClause><![CDATA[RELATEDINVENTORYLINEID IS NOT NULL]]></whereClause>
+      </index>
       <index name="M_INVENTORYLINE_PRODUCT" unique="false">
         <index-column name="M_PRODUCT_ID"/>
       </index>