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