Re: MAX/MIN optimization via rewrite (plus query rewrites generally) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: MAX/MIN optimization via rewrite (plus query rewrites generally)
Date
Msg-id 4336.1100153319@sss.pgh.pa.us
Whole thread Raw
In response to Re: MAX/MIN optimization via rewrite (plus query rewrites generally)  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Responses Re: MAX/MIN optimization via rewrite (plus query rewrites generally)  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
List pgsql-hackers
Alvaro Herrera <alvherre@dcc.uchile.cl> writes:
> What about having a new column in pg_aggregate which would point to a
> function that would try to optimize the aggregate's handling?

I can't get very excited about this, because how would you make a
reasonably stable/narrow API for such a thing?  The function as you
propose it would have to know everything about not only the planner's
data representations but the N specific places it would be called from.

The existing selectivity functions are bad enough on this score ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: MAX/MIN optimization via rewrite (plus query rewrites
Next
From: "John Hansen"
Date:
Subject: Re: MAX/MIN optimization via rewrite (plus query rewrites generally)