|
Ata510@aol.com wrote:
So, if your statement in question in SQL says "SELECT .... from ECH WHEREI 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
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.
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.