|
AFAIK, both the key fields and selections are searched, in order, against existing logicals. So to answer your question, yes. It -may- make a difference. I've also been told that QRY will only search so many indexes (in order of creation) before it gives up and builds it's own. So I guess, the best you could do is to build individual logicals, indexed by EMPNO and selected by YEAR and hope that the query optimizer gets it. Maybe create logicals like EMPL1999, EMPL1998, EMPL1997, etc. each indexed by EMPNO, and within your process, pick the appropriate file (instead of using a select clause) and the "EMPNO=1000" may trigger OPNQRYF to use a "position cursor" kind of acceleration. (like you would with a SETLL/READ loop) HTH Loyd Goodbar wrote: > > Does the order of selection criteria in OPNQRYF's QRYSLT parameter make a > difference in which access path is chosen? If I have QRYSLT('EMPNO=1000 *AND > YEAR=1999'), is it treated differently from QRYSLT('YEAR=1999 *AND > EMPNO=1000')? > +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@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 mailing list archive is Copyright 1997-2025 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.