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



I'm by no means an SQL Guru, and am asking as much for my own benefit as
for any other reason.

Are you doing a SELECT on the two files for the fields you need, WHERE
the fields equal and ORDER BY the fields you want as keys?  Is there a
one-to-one relationship?  Are you sequentially reading the result set?
Are you reading most of the records?  If not, might it be faster to
select for the key field values as well as the common field instead of
making 1 humongous result set?  Or breaking it up into two different
selects if you are reading some from file 1 but want every matching
record from file 2?  

If reading individual records, maybe native IO would be faster?
(Assuming the key fields and common field are key fields in the
component files. . .)
 
> -----Original Message-----
> 
> I have 2 files I want joined and indexed on 1 key from each of the 2
> files.
> The 2 files are named s1 and s3, both have the common field of
> Order# (on) in them.
> s1 JOIN s3 ON s1on = s3on .
> 
> I want the joined file indexed by s1name, then s3itno
> 
> ORDER BY s1name, s3itno .
> 
> I'm using embedded sql in rpg and everything works fine except the
> response time on one of our production machines gets to be 5+
minutes.!

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.