Fixed 12420: Optimize whereclause
authorStefan Hühner <stefan.huehner@openbravo.com>
Tue, 23 Feb 2010 18:42:24 +0100
changeset 6476 efdbe4e29619
parent 6475 35dc05a84c8b
child 6477 2c3334aee6eb
child 6678 5224213157be
Fixed 12420: Optimize whereclause
to make grid view of product price tab faster with many products & prices
src-db/database/sourcedata/AD_TAB.xml
--- a/src-db/database/sourcedata/AD_TAB.xml	Tue Feb 23 17:50:44 2010 +0100
+++ b/src-db/database/sourcedata/AD_TAB.xml	Tue Feb 23 18:42:24 2010 +0100
@@ -1710,7 +1710,7 @@
 <!--192-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--192-->  <AD_COLUMN_ID><![CDATA[2760]]></AD_COLUMN_ID>
 <!--192-->  <HASTREE><![CDATA[N]]></HASTREE>
-<!--192-->  <WHERECLAUSE><![CDATA[(SELECT isActive FROM M_Product WHERE M_Product.M_Product_Id = M_ProductPrice.M_Product_Id ) = 'Y']]></WHERECLAUSE>
+<!--192-->  <WHERECLAUSE><![CDATA[EXISTS (SELECT 1 FROM M_Product WHERE M_Product.M_Product_Id = M_ProductPrice.M_Product_Id  AND M_Product.IsActive = 'Y')]]></WHERECLAUSE>
 <!--192-->  <PROCESSING><![CDATA[N]]></PROCESSING>
 <!--192-->  <ISSORTTAB><![CDATA[N]]></ISSORTTAB>
 <!--192-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>