× 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.



Hi Mike,

Would putting the table function alone in a CTE, then joining the result of the CTE with a table perform any better? SQL might be able to join that result better.

--
*Peter Dow* /
Dow Software Services, Inc.
909 793-9050
petercdow@xxxxxxxxx <mailto:petercdow@xxxxxxxxx>
pdow@xxxxxxxxxxxxxx <mailto:pdow@xxxxxxxxxxxxxx> /

On 2/24/2016 10:32 AM, Mike Jones wrote:
Hi Steve,

You can join to table functions now. I do a lot with table functions.
That said, it can be challenging to get good performance with table
functions and joins. Their results are a black box that return some data,
and it is therefore difficult for the SQL optimizer to predict that
returned set and optimize it with joined data. As a result, I use them
more for performing actions against the database in the middle of set
processing. I also use a table function to call CL programs in the middle
of set processing. You can get good performance with fetching data via
table functions and joins, but it tends to take more engineering effort to
make that happen versus a query with joins that does not involve table
functions.

Mike

Would be neat to have an SQL function return a result set. That way you
could join to the SQL function.
select a.custName, b.ordnum, b.orderDate
from custMaster a
join GetCustomerOrders( a.custNum ) b



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.