| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Navigation vs Relational operators
alfredo_at_ncs.es (Alfredo Novoa) wrote in message news:<40a4a902.3161946_at_news.tehnicom.net>...
> On 13 May 2004 10:00:50 -0700, paul_geoffrey_brown_at_yahoo.com (Paul G.
> Brown) wrote:
>
> > How do you 'navigate' union / projection / restriction / intersection /
> > outer-join / anti-join / difference / division?
>
> What anti-join is?
Given two relations, R < a, b, c > and Q < a, d, e >, the anti-join R [Aj] Q is all tuples from R where there does not exist a corresponding tuple in Q meeting some join criteria.
It's equivalent to SQL's
SELECT *
FROM R
WHERE NOT EXISTS ( SELECT 1
FROM Q
WHERE R.a = Q.a );
for example.
It's often useful, in query planning, to 'flatten' the sub-query, because there are a raft of other re-writes that you can do with an anti-join and other join forms (and many you can't). You can think of it in terms of a join and a difference if you like, but there are really efficient physical operators for the anti-join Received on Fri May 14 2004 - 19:00:06 CDT
![]() |
![]() |