Re: function not called if part of aggregate

Поиск
Список
Период
Сортировка
От Steinar H. Gunderson
Тема Re: function not called if part of aggregate
Дата
Msg-id 20060611173155.GA9244@uio.no
обсуждение исходный текст
Ответ на function not called if part of aggregate  ("Craig A. James" <cjames@modgraph-usa.com>)
Список pgsql-performance
On Sun, Jun 11, 2006 at 10:18:20AM -0700, Craig A. James wrote:
> This works well, but it requires me to actually retrieve the function's
> value 800 times.

Is this actually a problem?

> So I thought I'd be clever:
>
>   select count(1) from (select foo_init(value) from foo_init_table order by
>   value_id) as foo;

Why not just count(foo_init(value))?

/* Steinar */
--
Homepage: http://www.sesse.net/

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

Предыдущее
От: "Craig A. James"
Дата:
Сообщение: function not called if part of aggregate
Следующее
От: Tom Lane
Дата:
Сообщение: Re: function not called if part of aggregate