Re: query patterns for multipass aggregating - Mailing list pgsql-general

From Andrew Gierth
Subject Re: query patterns for multipass aggregating
Date
Msg-id 878t1zwlh8.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to Re: query patterns for multipass aggregating  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Responses Re: query patterns for multipass aggregating
List pgsql-general
>>>>> "Andrew" == Andrew Gierth <andrew@tao11.riddles.org.uk> writes:

 Andrew> Unfortunately, the planner isn't smart enough yet to know that
 Andrew> these two are equivalent,

oops, I edited the second one before posting in a way that made them not
be equivalent: adding a "group by x0.item_id" in both subqueries in
method 2 makes them equivalent again. Without that, the result differs
slightly if there are no matching color or image rows (NULL vs. empty
array).

-- 
Andrew (irc:RhodiumToad)


pgsql-general by date:

Previous
From: Andrew Gierth
Date:
Subject: Re: query patterns for multipass aggregating
Next
From: Rob Nikander
Date:
Subject: Re: query patterns for multipass aggregating