× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Luis Rodriguez wrote:
<<SNIP>>
Which option would you think is more efficient? Interestingly enough, a small test I did with only one field yielded exactly the same results on Visual Explain.


Presumably /query rewrite/ reduces both and thus recognizes both, as the /same query/ request for which both are optimized the same.

If the result set should be small, I would prefer to write the query to be pretty versus efficient :-) In that case, using a UDF for both the /state name/ and the /customer description/ with the respective code as the input. Presumably I would have use for those same deterministic UDFs in other situations, since there should only be one copy of the data against which to correlate the encoding to its appropriate text string. In that case I would use [while also eliminating A.* and arranging code fields with its text following]:

SELECT A.cName
, A.sc1, StateName(A.sc1)
, A.sc2, StateName(A.sc2)
, A.cc1, CustDesc(A.cc1)
, A.cc2, CustDesc(A.cc2)
FROM A.Cust

Regards, Chuck

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.