Re: table in ANSI JOIN *but not* being accessed at all?
From: Michael Moore <michaeljmoore_at_gmail.com>
Date: Tue, 31 Jan 2012 12:53:25 -0800
Message-ID: <CACpWLjNwYNHBgOrUT+OvAq3UbEwzHPp==9ugNJXu4CCSXmQ7tA_at_mail.gmail.com>
I don't quite get what you are saying.
You said, "If I run this statement I get 196 total rows." The example shows
Date: Tue, 31 Jan 2012 12:53:25 -0800
Message-ID: <CACpWLjNwYNHBgOrUT+OvAq3UbEwzHPp==9ugNJXu4CCSXmQ7tA_at_mail.gmail.com>
I don't quite get what you are saying.
You said, "If I run this statement I get 196 total rows." The example shows
INNER JOIN IBARDM.CUSTOMER cu <<---- This table not being access in the SELECT or WHERE stmt
ON cu.customer_id = co.customer_id
Later you say:
"*Now, if I add a CU.CUSTOMER_ID* (the table not being accessed) *to
the*WHERE, the SELECT, or the
* INNER JOIN*, then I get 0 rows and the table gets accessed."
From your example CU.CUSTOMER_ID already *IS* in the INNER JOIN. I'm confused.
I've tried to duplicate the behavior you've described but with simplified
tables. No success. It's a weird problem, but I suspect there is a reason
rather than it being a bug.
Mike
-- http://www.freelists.org/webpage/oracle-lReceived on Tue Jan 31 2012 - 14:53:25 CST