Re: Function execution costs 'n all that

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Function execution costs 'n all that
Дата
Msg-id 19701.1168891506@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Function execution costs 'n all that  (Brian Hurt <bhurt@janestcapital.com>)
Ответы Re: Function execution costs 'n all that  (Neil Conway <neilc@samurai.com>)
Re: Function execution costs 'n all that  (Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>)
Список pgsql-hackers
Brian Hurt <bhurt@janestcapital.com> writes:
> Non-developer here, but we use a lot of plpgsql functions at work.  And 
> the functions we use fall into two broad, ill-defined catagories- 
> "expensive" functions and "cheap" functions.  What I'd like as a user is 
> some way to tell the planner "this function is expensive- prefer plans 
> which call this function less even if they're otherwise more expensive" 
> or "this function is cheap, prefer plans that are otherwise less 
> expensive even if they call this function more often".  Precise cost 
> estimates aren't that important, IMHO.

Right, so a plain constant cost would be plenty for your situation.

I suspect there's an 80/20 rule at work here --- the estimator-function
side of this will take most of the effort to design/implement, but not
get used nearly as much as the plain-constant form ... maybe we should
just do the constant for starters and see how many people really want to
write C-code estimators ...
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Brian Hurt
Дата:
Сообщение: Re: Function execution costs 'n all that
Следующее
От: Neil Conway
Дата:
Сообщение: Re: Function execution costs 'n all that