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



You can use either a logical (eg. View) or a physical file (table) as your
business needs and DB definitions allow and require. What you should cannot
do (IIRC) is to reference an SQL index directly. Nevertheless, having the
right indexes will do wonders (in terms of performances) when accessing
your tables and views.

I, for example, am a fan of using views as a way of encapsulating some
business processes and methods. With them I don't have to reinvent the
wheel every time I have to, say, select to tables according to a particular
column (eg. date, customer number, etc). Just query the appropriate view
and "voilá", the info is there...

HTH,

Luis

Sent from my Moto G phone. Please excuse my brevity.
On Sep 3, 2015 3:59 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.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.