Re: join removal

Pavel Stehule <pavel.stehule@gmail.com>

From: Pavel Stehule <pavel.stehule@gmail.com>
To: Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi>
Cc: Robert Haas <robertmhaas@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Greg Stark <stark@mit.edu>, "<pgsql-hackers@postgresql.org>" <pgsql-hackers@postgresql.org>
Date: 2010-03-29T08:33:07Z
Lists: pgsql-hackers
2010/3/29 Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi>:
> On 2010-03-29 11:19 +0200, Pavel Stehule wrote:
>> postgres=# explain select  a from a left join b on true;

you have a true.

I forgot SELECT DISTINCT

regards

Pavel
>
> This is effectively a cross join and it would give wrong answers.  Try
> SELECT a FROM a LEFT JOIN b ON a.a = b.b;
>
>
> Regards,
> Marko Tiikkaja
>