Ata510@aol.com wrote:

So, if your statement in question in SQL says "SELECT .... from ECH WHERE
HORD=variable and has an ORDER BY HID, blah blah - but never says in the
WHERE clause, WHERE HID='valuexyz' for active records, then ECHL01 will
naturally not be used by the optimizer. This is because ECHL01 is too
selective to fit the SQL statement's potential selection - the statement is
written to consider all records regardless of HID value, but ECHL01 does
indeed care about what is HID's value.
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

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2019 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 here. If you have questions about this, please contact [javascript protected email address].