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

From Hannu Krosing
Subject Re: [HACKERS] Bug on complex join
Date
Msg-id 36E51A7E.4963BBA2@trust.ee
Whole thread Raw
In response to Re: [HACKERS] Bug on complex join  (Oleg Broytmann <phd@sun.med.ru>)
Responses Re: [HACKERS] Bug on complex join
List pgsql-hackers
Oleg Broytmann wrote:
> 
> Hello!
> 
>    Another symptom. The query
> 
> SELECT cn.date_i, cn.pos_id
>    FROM central cn
>       WHERE cn.date_i >= current_date - '300 days'::timespan
> 
> returns 3156 rows. But this:
> 
> SELECT cn.date_i, p.subsec_id, cn.pos_id, p.pos_id
>    FROM central cn, shops sh, districts d, positions p
>       WHERE cn.date_i >= current_date - '300 days'::timespan

this should return  3156 * count(shops) * count(districts) * count(positions)

which is probably too much for the backend ;(

-----------------------
Hannu


pgsql-hackers by date:

Previous
From: Vince Vielhaber
Date:
Subject: Re: [HACKERS] Developers globe
Next
From: The Hermit Hacker
Date:
Subject: Re: [HACKERS] Developers globe