Originally IBM recommend specifying the physical...

As I understand it, originally it worked like so:
- if you had a select/omit logical that for example selected records where
myfld=1
- you did a SELECT * FROM MYLF
- the SQE had to examine MYLF and would rewrite(?) the query as SELECT *
FROM MYPF WHERE MYFLD=1.
(or perhaps drop into CQE?)

Anyway there was extra work involved...

Now however, the SQE has advanced such that using a LF isn't detrimental
and could in fact help.

Charles

On Thu, Sep 3, 2015 at 4:28 PM, Alan Shore <ashore@xxxxxxxx> wrote:

Hi Booth

I understand and agree with your comment about your biggest problem being
that you haven't yet figured out how to ask the right questions.

I have been using SQL for quite a few years now - and I STILL not yet
figured out how to ask the right questions.

When I first started using SQL - I was told - ALWAYS use the physical with
your selects (or omits) within the SQL script (although I could never find
out why)

I followed this directive UNTIL I had to run one particular (relatively
simple) SQL script.
It gave me the answers I was looking for - but it took a rather long time
to run - 20 minutes or so - a LARGE file
So just for the hell of it, I changed the script to use a logical (for the
selects and omits) and it literally took seconds - with the same results

Nowadays - I still tend to use the physical - but I keep the idea of using
a logical in the back of my head
Alan Shore
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
'If you're going through hell, keep going.'
Winston Churchill

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
Booth Martin
Sent: Thursday, September 03, 2015 4:15 PM
To: Midrange Systems Technical Discussion
Subject: SQL sort

I am fairly new with SQL so please excuse what are most likely very simple
questions.

I am looking to understand the pros and cons with SQL.
On large files with data that will be used in various applications and in
various sort-by schemes, are logical files a help?
If so, does one reference the physical file and then SQL finds the best
logical, or does it help to specify a specific logical file?
What is the right way to collect a set of records equal to SFLPAGE?

So far, I believe my biggest problem is that I haven't yet figured out how
to ask the right questions.


--
Booth Martin
www.martinvt.com
(802)461-5349

If the world comes to an end, I want to be in Cincinnati. Everything
comes there ten years later. -- Mark Twain
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 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].