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



Chris,

I arrived at a similar destination on Thursday (what you say below).

My strategy changed from the 'humongous' result set approach
(although, that one was completely soft coded),
To reading the primary file a record at a time (RPG), then using the 
Order# (join) field to build a smaller, secondary result set (SQL).
I write my workfile records in the secondary loop. 
After that it's just subfile business as usual.
(if subfile hits eof(workfile) it can ask for the next nnn  records.)

Response time has gone from, oh, 6 to 11 minutes to 5 to 20 seconds.

The user can indicate a Primary 'Position-to' value & 'Sort-by' value
And also a secondary Position-to and Sortby.
The position to is optional as is the secondary sortby.

There are 16 possible Primary selections and 5 additional Secondary
Offerings.  This encompasses about 9 different files.

A couple selections are date fields, the only numeric one is 
TELEPHONE number.

(yeah, I know, I hate numeric telephone numbers, of course, down
The road, when we need to do arithmetic on them, I'll be glad <?> )

Management request: Let's bill our customers the amount their
                     phone# is equal to.
Programmer........:  Sure, we can do that, it's already numeric!


Thanks,

John


> ------------------------------
> 
> message: 5
> date: Mon, 9 May 2005 14:50:43 -0400
> from: "Chris Wolcott" <cwolcott@xxxxxxxxxxxxxxxxxxxxxx>
> subject: RE: Join 2 files with 1 key from each file.
> 
> 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 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.