Re: [HACKERS] Bug on complex join - Mailing list pgsql-hackers

From Vadim Mikheev
Subject Re: [HACKERS] Bug on complex join
Date
Msg-id 36E0FE38.E56C435D@krs.ru
Whole thread Raw
In response to Bug on complex join  (Oleg Broytmann <phd@sun.med.ru>)
Responses Re: [HACKERS] Bug on complex join
Re: [HACKERS] Bug on complex join
List pgsql-hackers
Oleg Broytmann wrote:
> 
> Hi!
> 
>    I am continuing playing with the query (I reduced it to):
> SELECT  sh.distr_id , d.distr_id
>    FROM central cn, shops sh, districts d
>       WHERE cn.shop_id = sh.shop_id
> 
> and got 27963 rows. I filtered it out (with awk:) where $1 == $2 (1st
> column is equal to second) and got 3104 rows.
> 
>    But the query
> SELECT d.*
>    FROM central cn, shops sh, districts d
>       WHERE cn.shop_id = sh.shop_id AND sh.distr_id = d.distr_id
> 
> returned 0 rows.
> 
>    Where is the bug?

Please post me EXPLAIN VERBOSE for second query.

Vadim


pgsql-hackers by date:

Previous
From: Vadim Mikheev
Date:
Subject: Re: [HACKERS] Not enough memory for complex join
Next
From: Tatsuo Ishii
Date:
Subject: Re: [HACKERS] Why is that so slow?