Re: HAVING push-down
От | Simon Riggs |
---|---|
Тема | Re: HAVING push-down |
Дата | |
Msg-id | 1169825453.3772.367.camel@silverbirch.site обсуждение исходный текст |
Ответ на | Re: HAVING push-down (Gregory Stark <stark@enterprisedb.com>) |
Ответы |
Re: HAVING push-down
|
Список | pgsql-hackers |
On Fri, 2007-01-26 at 15:22 +0000, Gregory Stark wrote: > "Simon Riggs" <simon@2ndquadrant.com> writes: > > > I've just read a paper that says PostgreSQL doesn't do this. My reading > > of the code is that we *do* evaluate the HAVING clause prior to > > calculating the aggregates for it. I thought I'd check to resolve the > > confusion. > > > You mean in cases like this? > > postgres=# explain select count(*) from customer group by c_w_id,c_d_id,c_id having c_w_id = 1 and c_d_id=1 and c_id=1; > QUERY PLAN > ------------------------------------------------------------------------------------ > GroupAggregate (cost=0.00..13.61 rows=1 width=12) > -> Index Scan using pk_customer on customer (cost=0.00..13.56 rows=4 width=12) > Index Cond: ((c_w_id = 1) AND (c_d_id = 1) AND (c_id = 1)) > (3 rows) OK, thanks. I'll feedback to the author of the paper I was reviewing. -- Simon Riggs EnterpriseDB http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: