David

At 02:26 PM 12/1/1997 -0700, you wrote:
>>>> John Carr <74711.77@compuserve.com> 11/30 10:18 PM >>>
>
>>RE: Re: SQL select via logicals
>
>>I also think it would be good to have a mechanism to force the inspection
>>of all indexes before deciding to Sort, or Copy the data or Build an Index
>>on the fly. 
>
>>But I can't imagine how they would implement it.  I can see a new parameter
>>on OPNQRYF but can't see how they would implement it in SQL. Unless it was
>>a system wide System Value.
>
>>John Carr
>
>A system value and option on CHGQRYA would be better than nothing.
>
>We have had some problems with the optimizer.  In a few cases it used 
>a logical  for months and then, for no obvious reason, it times out and 
>consistently builds an access path.  When you don't know what the access 
>plan was it is difficult to determine why it is no longer being used.  In
these 
>cases forcing the optimizer to look at possibilities would help.

The changes you describe may have to do with changes in the file size.
That's one of the factors used by the optimizer, which estimates the cost
of performing the given query. Now, if you're talking embedded, the access
plan is stored in the *PGM and would not change without some severe change.
If you're talking OPNQRYF or interactive SQL or QMQRY or dynamic embedded
SQL or SQL CLI, then the access plan is redetermined every it's run.

Check out the Database Programming manual, the Data Management Guide, and
the SQL Programming and Reference manuals. There are appendices that deal
with query performance, as well as using STRDBG to see what the optimizer
did. Changing the order of the files, whether in OPNQRYF or in an SQL
statement, can have profound affects on the time it takes to execute a query.

Anyway, in the kindest possible way, RTFM. There's a lot of really
excellent material that will help you in setting up these things.

BTW, one thing you should almost always do (some OVRDBF issues aside, I
think) is set the ALWCPYDTA(*OPTIMIZE) parameter of OPNQRYF.

Cheers

Vernon Hamberg
Systems Software Programmer
Old Republic National Title Insurance Company
400 Second Avenue South
Minneapolis, MN  55401-2499
(612) 371-1111 x480


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to "MIDRANGE-L@midrange.com".
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


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.