On Thu, 24 Oct 2002, Tomasz Myrta wrote:
> > The system doesn't realize that it can limit the subquery when the only
> > things it has is the join clause and the limiting clause on the other
> > table. Like Tom's message about the other view, it won't imply that
> > X.foo=12345 from foo=12345 when the exposed foo is B.foo.
>
> Is this what we should expect, or rather a bug?
> The system knows how to join tables, but fails with joining views or
> subselects :-(
It knows how to join them, it doesn't know that it can change the
clauses given to it in order to make it more efficient.
Basically, as I understand it,select * from a,b where a.a=b.a and a.a=3;
isn't going to realize that b.a=3 and act as if
you typed that. It may consider an index scan in
a nested loop for a.a=b.a, but that's not quite
the same.