I'm no SQL expert, but when AS/400 Query did something like that, it was joining every possible combination of join fields into a massive work file...
I don't know if SQL does something similar, but how's your disk space looking??
If all else fails, try just the A-B join by itself; and the B-C by itself, and see what you get...
Paul E Musselman
PaulMmn@xxxxxxxxxxxxx
-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Dan
Sent: Tuesday, February 13, 2018 4:51 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: Re: Query "stopped" in its tracks, still "running"
Thanks Paul.
Actually, two inner joins, A-B, B-C.
A has 10M records.
B has 32M records.
C has 19M records.
There are selections in A and C, simple as in WHERE STATUS IN ('A', 'H',
'U').
Based on a similar query, I expect to get less than 17M records in the
created table. That query, which ran in under 15 minutes, generated 17M
records, and my new query adds new selection which will shrink the results.
1 hour and 20 minutes after the job started, the I/O counts on WRKJOB's
Display Open Files screen haven't budged since my last report.
- Dan
On Tue, Feb 13, 2018 at 4:31 PM, Musselman, Paul <
pmusselman@xxxxxxxxxxxxxxxx> wrote:
You're joining 4 tables? About how many records in each?
You said one of the joins has simple selections. How about the others?
How are the files joined? A-B, A-C, A-D, or something more complicated,
like A-B, B-C, C-D??
As an Amazon Associate we earn from qualifying purchases.