× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



> From: jpcarr@tredegar.com
>
> The first with a IN statement would be done in one pass,   doing
> sortof a "Lookup" compare of the values in the list.
>
> The second has an OR statement,   One way the optimizer would do
> this is to
> create a bitmap of both sides of the OR predicate then XOR to a final
> bitmap.
> (Not saying that is what it did, just that it could have taken this
> route)

It's this last bit that bothers me.  It "could have" done this.  It could
have phoned out for pizza, for all we know.  The fact that SQL "does stuff"
under the covers doesn't mean it's doing "the right stuff".

When we write native DB2, we know exactly how we're accessing the database,
and while we can certainly write bad code, that's a programmer issue, not a
"black box" issue.  If somebody consistently writes stupid database code,
then they should find other work.  But it's relatively easy to diagnose
stupid database code by looking at the source.

With SQL, you really don't know if you've done something stupid.  In my
case, I evidently did something stupid.  However, adding a logical view
fixed it.  So now it's not stupid anymore.  Why?  I dunno.  You dunno.
Nobody on the list seems to know.

Yet, this is the technology we're supposed to base our mission critical
systems on.  It reminds me of the old flow chart we had on the wall at SSA.
We had user input at the beginning, and output at the end.  In the middle
was a big black box labeled "A Miracle Occurs".  That's sort of what SQL is
like, especially with more complex syntaxes.

But hey, I'm biased towards native DB2 as we all know.  But doesn't this
sort of black magic worry ANYBODY else?

Joe



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-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.