Fixed 7898: fixed slow Product selector performance when using BOM
authorStefan Hühner <stefan.huehner@openbravo.com>
Mon, 02 Mar 2009 17:17:25 +0100
changeset 3279 27857f98b2e3
parent 3278 9a161c2aed33
child 3280 1dd6a0574314
Fixed 7898: fixed slow Product selector performance when using BOM
adds missing index to speed up BOM_PRICE{LIST,LIMIT,STD} functions which are used in the selector
src-db/database/model/tables/M_PRODUCT_BOM.xml
--- a/src-db/database/model/tables/M_PRODUCT_BOM.xml	Mon Mar 02 17:08:12 2009 +0100
+++ b/src-db/database/model/tables/M_PRODUCT_BOM.xml	Mon Mar 02 17:17:25 2009 +0100
@@ -69,6 +69,9 @@
       <foreign-key foreignTable="M_PRODUCT" name="MPRODUCT_MPRODUCTBOM" onDelete="cascade">
         <reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
       </foreign-key>
+      <index name="M_PRODUCT_BOM_M_PRODUCT_ID" unique="false">
+        <index-column name="M_PRODUCT_ID"/>
+      </index>
       <check name="M_PRODUCT_BOM_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
     </table>
   </database>