|
>>so you are saying that the order of select/omit plays a role? Precisely. In his book, "Database Design and Programming for DB2/400", Paul Conte explains it nicely: "Because DB2/400 (now UDB for iSeries) steps through the select/omit specifications in order and quits as soon as a condition is satisfied, you can improve the runtime efficiency of select/omit specifications by putting the conditions that are most likely to be matched towards the beginning of a series of multiple conditions ..." So, your initial Omit specification is probably being matched by a much greater number of records, (and hence the records are immediately excluded) than the corresponding Select condition. The first Select condition is unmatched, so DB2 continues with the next Select to seek a match - and still comes up empty for the vast majority of records. Brian Parkins
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.