×
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.
On 4/6/11 12:25 PM, Hohlen, Kent wrote:
<<SNIP>> Right now there is no WHERE clause. Just a
SELECT * From File ORDER BY Field1, Field2, Field3.
Why would STRSQL use this path and not the RPG program?
To better mimic the STRSQL report with output to display, add the
OPTIMIZE FOR 22 ROWS clause to the SELECT in the RPG program. Or change
the output device in STRSQL, using F13=Services, to use *OUTFILE or
*PRINT... for which OPTIMIZE FOR ALL ROWS is the implementation for the
query, and presumably the default for the query in the RPG program
without that clause specifying some specific value.
If there is no WHERE clause and all the rows will be fetched, random
access [i.e. read via index] is a poor implementation, and thus the
optimizer will tend to choose "arrival sequence" to get the data when
there is no WHERE clause. IIRC the SQL assumes optimizing for all rows
for the non-WHERE query because there is nothing obvious that ensures
only a limited number of rows will be processed by the FETCH.
Regards, Chuck
As an Amazon Associate we earn from qualifying purchases.
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.