Re: Unnecessary repeat condition for a self inner join

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Robins Tharakan" <tharakan(at)gmail(dot)com>
Cc: pgsql-sql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Unnecessary repeat condition for a self inner join
Date: 2008-07-12 15:20:25
Message-ID: 14041.1215876025@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"Robins Tharakan" <tharakan(at)gmail(dot)com> writes:
> Besides, I did a simple test and although you are right about the optimizer
> deducing implied equality conditions, this holds true only for a direct
> join. In the second query, the optimizer recommends a table scan even for a
> simple IN() condition.

An IN is not an equivalence condition.

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Lewis Cunningham 2008-07-12 18:59:27 Re: Rollback in Postgres
Previous Message Martín Marqués 2008-07-12 14:01:17 Re: CHAR to INT