×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




pretty sure it has to do with the SQL query optimizer evaluating all the
WHERE OR rules in parallel.

the failing code does this:
WHERE ( INSEQN = ' ' or INSEQN <> a.srcseq )

prior to V7R4 SQL would evaluate INSEQN = ' ', find it was true, and not
bother to evaluate INSEQN <> a.srcseq
now in V7R4, SQL is evaluating both sides of the OR at the same time.
Which could save time in the case where the first evaluation returns FALSE.

I had a similar case on a V7R1 system where I was comparing a character
parameter against DATE columns.
WHERE ( inDATE = ' ' or inDATE > a.shipDate )
I had to change the code to
WHERE ( inDate = ' ' or ( inDate <> ' ' and inDate > a.shipDate ))

-Steve

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

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