details:   https://code.openbravo.com/erp/devel/pi/rev/a1e7b96abcdd
changeset: 21391:a1e7b96abcdd
user:      Stefan Hühner <stefan.huehner <at> openbravo.com>
date:      Fri Oct 25 15:52:39 2013 -0400
summary:   Issue 25029: Cleanup: delete a few unused,non-public xsql methods

details:   https://code.openbravo.com/erp/devel/pi/rev/0c5a121a79dd
changeset: 21392:0c5a121a79dd
user:      Stefan Hühner <stefan.huehner <at> openbravo.com>
date:      Fri Oct 25 15:53:42 2013 -0400
summary:   Fixed 25029: Improve performance of linked items
Remove a few not really needed to_char calls which are confusing oracle
optimizer in at least one case causing it to not use an index where it
could.

diffstat:

 src/org/openbravo/erpCommon/utility/UsedByLink_data.xsql |  36 ++-------------
 1 files changed, 5 insertions(+), 31 deletions(-)

diffs (75 lines):

diff -r 42c4ede6b0ae -r 0c5a121a79dd 
src/org/openbravo/erpCommon/utility/UsedByLink_data.xsql
--- a/src/org/openbravo/erpCommon/utility/UsedByLink_data.xsql  Mon Oct 28 
17:23:02 2013 +0100
+++ b/src/org/openbravo/erpCommon/utility/UsedByLink_data.xsql  Fri Oct 25 
15:53:42 2013 -0400
@@ -177,47 +177,33 @@
     </Sql>
     <Parameter name="adTabId"/>
   </SqlMethod>
-  <SqlMethod name="identifiers" type="preparedStatement" return="multiple">
-    <SqlMethodComment></SqlMethodComment>
-    <Sql>
-      <![CDATA[
-        SELECT C.COLUMNNAME AS NAME
-        FROM AD_FIELD F, AD_COLUMN C 
-        WHERE F.AD_TAB_ID = ? 
-        AND F.AD_COLUMN_ID = C.AD_COLUMN_ID 
-        AND C.ISIDENTIFIER = 'Y' 
-        AND C.ISACTIVE = 'Y'
-      ]]>
-    </Sql>
-    <Parameter name="adTabId"/>
-  </SqlMethod>
   <SqlMethod name="selectLinks" type="preparedStatement" return="multiple">
     <SqlMethodComment></SqlMethodComment>
     <Sql>
       <![CDATA[
         SELECT (AD_WINDOW.AD_WINDOW_ID) AS ID,
-        
(AD_COLUMN_IDENTIFIER(TO_CHAR(?),TO_CHAR(AD_WINDOW.AD_WINDOW_ID),TO_CHAR(?))) 
AS NAME,
+        (AD_COLUMN_IDENTIFIER(?,TO_CHAR(AD_WINDOW.AD_WINDOW_ID),?)) AS NAME,
         tab1.AD_TAB_ID AS AD_TAB_ID,
         tab1.AD_WINDOW_ID AS AD_WINDOW_ID,
         table1.NAME AS TABLENAME,
         menu1.NAME AS AD_MENU_NAME,
         tab1.UIPATTERN
         FROM AD_WINDOW
-        LEFT OUTER JOIN AD_TAB   tab1 ON (tab1.AD_TAB_ID = TO_CHAR(?))
+        LEFT OUTER JOIN AD_TAB   tab1 ON (tab1.AD_TAB_ID = ?)
         LEFT OUTER JOIN AD_TABLE table1 ON (tab1.AD_TABLE_ID = 
table1.AD_TABLE_ID)
         LEFT OUTER JOIN AD_MENU  menu1 ON (menu1.AD_WINDOW_ID = 
tab1.AD_WINDOW_ID)
-        WHERE TO_CHAR(AD_WINDOW.AD_WINDOW_ID) = TO_CHAR(?) 
+        WHERE AD_WINDOW.AD_WINDOW_ID = ? 
         AND 1=1 
         ORDER BY 2
       ]]>
     </Sql>
     <Parameter name="fields" optional="true" type="replace" after="SELECT (" 
text="AD_WINDOW.AD_WINDOW_ID"/>
     <Parameter name="tablename"/>
-    <Parameter name="keyColumn" optional="true" type="replace" 
after="AD_COLUMN_IDENTIFIER(TO_CHAR(?),TO_CHAR(" text="AD_WINDOW.AD_WINDOW_ID"/>
+    <Parameter name="keyColumn" optional="true" type="replace" 
after="AD_COLUMN_IDENTIFIER(?,TO_CHAR(" text="AD_WINDOW.AD_WINDOW_ID"/>
     <Parameter name="adLanguage"/>
     <Parameter name="tablename" optional="true" type="replace" after="FROM " 
text="AD_WINDOW"/>
     <Parameter name="tabid" />     
-    <Parameter name="columnname" optional="true" type="replace" after="WHERE 
TO_CHAR(" text="AD_WINDOW.AD_WINDOW_ID"/>
+    <Parameter name="columnname" optional="true" type="replace" after="WHERE " 
text="AD_WINDOW.AD_WINDOW_ID"/>
     <Parameter name="keyId"/>
     <Parameter name="whereclause" optional="true" type="replace" after="AND 
1=1 " text=""/>
   </SqlMethod>
@@ -314,18 +300,6 @@
     <Parameter name="tableName"/>
   </SqlMethod>
   
-  <SqlMethod name="selectTableName" type="preparedStatement" return="string">
-    <SqlMethodComment></SqlMethodComment>
-    <Sql>
-      <![CDATA[
-        SELECT TABLENAME as ID
-        FROM AD_TABLE
-        WHERE AD_TABLE_ID = ?
-      ]]>
-    </Sql>
-    <Parameter name="key"/>
-  </SqlMethod>
-  
   <SqlMethod name="selectKeyValue" type="preparedStatement" return="string">
     <SqlMethodComment></SqlMethodComment>
     <Sql>

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to