Ehab Galal <[EMAIL PROTECTED]> writes:
> what i expected is that the optimizer will use the redundant predicates
> to create the plan, but the execution plan itself will not execute a
> redundant predicate.
> O! I see, it's my mistake. The example i mentioned was not a good example. I
> tried th
Thanks a lot.
> To: [EMAIL PROTECTED]
> CC: pgsql-sql@postgresql.org
> Subject: Re: [SQL] omitting redundant join predicate
> Date: Sun, 4 Nov 2007 11:35:36 -0500
> From: [EMAIL PROTECTED]
>
> Ehab Galal <[EMAIL PROTECTED]> writes:
> > explain select *
Ehab Galal <[EMAIL PROTECTED]> writes:
> explain select *
> from t1, t2, t3
> where t1.f <= t2.f
> and t2.f <= t3.f
> and t1.f <= t3.f;
> I was wondering if there is a
> way to omit the redundant join predicate.
You're not being very clear here. Do you mean will you get the same
answer if
I tried the following query
explain select *
from t1, t2, t3
where t1.f <= t2.f
and t2.f <= t3.f
and t1.f <= t3.f;
And that's what I got:
Nested Loop (cost=0.00..3.15 rows=1 width=368)
Join Filter:
(("outer".f <= "inner".f) AND ("inner".f <=
"outer".f))
-> Nested