Not a dumb question!

Yes there is a LF with a single primary unique key.

I always use SQL first if possible.

But this takes an hour to run in SQL, where RPG would run in a few seconds - because I would read sequentially thru the tiny file and then chain to the giant file.

It seems odd that SQL cant figure out to read sequentially thru the tiny file and then link to the giant file where the keys match.

I was hoping I could force or nudge SQL to read the tiny file as primary.



-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of John Yeung
Sent: Thursday, August 13, 2015 12:18 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: Re: SQL: how to speed up join tiny file to giant file

On Thu, Aug 13, 2015 at 12:47 PM, Stone, Joel <Joel.Stone@xxxxxxxxxx> wrote:
I have a filePROD with 10 million rows, and a fileFIX with 100 rows (both files are identical columns).

I want to join the two files, and update filePROD with fields from fileFIX where the primary key matches.

Maybe this is a dumb question, but you do have a keyed access path
over filePROD with the proper key, right?

John Y.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.