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



The select is not going at a temporary table, its going at a static table.
The table has cleanliness rules applied to the input data and the search
string is cleaned according to those same rules so to maximize matches of
the searches. I will take a look at these different techniques today and
try to write a program to test each one's efficiency.


Thanks
Bryce Martin
Programmer/Analyst I
570-546-4777



CRPence <CRPbottle@xxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
01/10/2011 04:45 PM
Please respond to
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>


To
rpg400-l@xxxxxxxxxxxx
cc

Subject
Re: Using host variables in SQLRPGLE doesn't seem to be
working....INclause






On 1/10/11 12:57 PM, Bryce Martin wrote:
Won't the multiple select statement have a negative impact on
performance compared to a list of predetermined values?

"Schutte, Michael Don01/10/2011 03:36 PM wrote:

Change this to...

Select Cast(rncust As Numeric(6,0)),
Cast(rnseq As Numeric(4,0)),
Cast(rntype As Numeric(2,0)),
rnword1, rnword2, rnword3, rnword4, rnword5
From rcm002pf
Where rnword1 in (select WorkKey1 from WorkTable1)


The real issue for performance impact would be for the /maintenance/
on the work table [i.e. drop, create, open, insert, clear...] rather
than the much smaller impact of running and using the result of the
subselect. If the input string is as easily parsed as the example, then
I believe a recursive CTE breaking the string into rows [of a true
temporary file as created by the database scoped to that SELECT] would
perform noticeably faster than using a user-created work table.

Regards, Chuck

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.