Re: Speeding up Aggregates

Поиск
Список
Период
Сортировка
От Rod Taylor
Тема Re: Speeding up Aggregates
Дата
Msg-id 1065219071.91586.11.camel@jester
обсуждение исходный текст
Ответ на Re: Speeding up Aggregates  (Dror Matalon <dror@zapatec.com>)
Список pgsql-performance
> > I hope it isn't the first or second one ;)
>
> CREATE or REPLACE FUNCTION item_max_date (int4, varchar) RETURNS
> timestamptz AS '
> select max(dtstamp) from items where channel = $1 and link = $2;
> ' LANGUAGE 'sql';


How about the below?

CREATE or REPLACE FUNCTION item_max_date (int4, varchar) RETURNS
timestamptz AS '
select max(dtstamp) from items where channel = $1 and link = $2;
' LANGUAGE 'sql' STABLE;

Вложения

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

Предыдущее
От: "Matt Clark"
Дата:
Сообщение: Re: reindex/vacuum locking/performance?
Следующее
От: "Matt Clark"
Дата:
Сообщение: Re: reindex/vacuum locking/performance?