Re: join removal

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Marko Tiikkaja <marko(dot)tiikkaja(at)cs(dot)helsinki(dot)fi>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Greg Stark <stark(at)mit(dot)edu>, "<pgsql-hackers(at)postgresql(dot)org>" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: join removal
Date: 2010-03-29 08:33:07
Message-ID: 162867791003290133i30f42b89ha084ab67ac6bf007@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2010/3/29 Marko Tiikkaja <marko(dot)tiikkaja(at)cs(dot)helsinki(dot)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
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2010-03-29 08:33:50 enable_joinremoval
Previous Message Marko Tiikkaja 2010-03-29 08:25:31 Re: join removal