On Wed, Jan 21, 2015 at 4:14 AM, Man-wai Chang <[email protected]> wrote:
> The same problem could happen to using a UDF in LOOKUP()? > ----------------- Resist the URGE to put a UDF() into all SQL statements. I am taking out Rtrim(LTrim( st.item )) = Rtrim(LTrim(tp.item)) now just st.item = tp.item in queries that drops my time fro 7 seconds to .1 second on sub-million row tables. This demands evaluation on the row level and tosses out all the benefits of using indexes. I inherited this crap from years of "poor" accounting reporting sprocs that have been running poorly for 7+ years. After we got real data in tables they started to slow down. When first written they were great because nobody knew what would happen over time as data growth happened. -- Stephen Russell Sr. Analyst Ring Container Technology Oakland TN 901.246-0159 cell --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/cajidmykmduvpcmrjorsyq7cc-jp2a--fn5euta_on017i1m...@mail.gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

