• Subject: Re: ECH / ECL Indexes
  • From: mbreit@xxxxxxxxxx
  • Date: Thu, 22 Jul 1999 09:24:13 -0500

>> I would very much like to know if I use the actual lgl
>> file ECHL01 in the SQL statement and I did NOT specify
>> the selection of ACTIVE records only WHERE HID = 'CH',
>> then would DB2/400 use the LGL or would it recreate
>> the index to inculde the HID= 'CZ' records.  Thanks
>> for the info already supplied  and TIA for any
>> responses.:) Frank

Short answer, is "if you code the logical file on the SQL statement you will
only get active records".  Whether DB/2 actually uses the logical file you
specify depends.  There may be another logical file that also selects only
active records but has better keys to match the specified selection or ordering
criteria, in which case the DB/2 optimizer will select that other logical.  But
the key point is that if the logical file used on the SQL statement only selects
certain records then that selection criteria will be applied automatically.

Mike Breitbach  -  Software Engineer
IBM Rochester,  AS/400 ERP Development
Internet: mbreit@us.ibm.com

| This is the BPCS Users Mailing List!
| To submit a new message, send your mail to BPCS-L@midrange.com.
| To subscribe to this list send email to BPCS-L-SUB@midrange.com.
| To unsubscribe from this list send email to BPCS-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: dasmussen@aol.com

This thread ...

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

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