Re: MAX/MIN optimization via rewrite (plus query rewrites
От | Mark Kirkwood |
---|---|
Тема | Re: MAX/MIN optimization via rewrite (plus query rewrites |
Дата | |
Msg-id | 4192CE06.8090809@coretech.co.nz обсуждение исходный текст |
Ответ на | Re: MAX/MIN optimization via rewrite (plus query rewrites generally) (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
Tom Lane wrote: > >A more radical way of handling it would be to detect the relevance of an >indexscan in indxpath.c and generate a special kind of Path node; this >would not generalize to other sorts of things as you were hoping, but >I'm unconvinced that the mechanism is going to be very general-purpose >anyway. The major advantage is that this would work conveniently for >comparing the cost of a rewritten query to a non-rewritten one. > > > I like this point - it makes sense to check that the rewritten query is less costly to execute than the original! >How are you planning to represent the association between MIN/MAX and >particular index orderings in the system catalogs? > > > > That is the next item to think on, we could have a rewrite catalog that holds possible transformations for certain functions (certain aggregates at this stage I guess). This is a bit like Alvaro's idea - however it may be better to represent it the way he suggested! regards Mark
В списке pgsql-hackers по дате отправления: