Re: Speeding up Aggregates

Поиск
Список
Период
Сортировка
От Rod Taylor
Тема Re: Speeding up Aggregates
Дата
Msg-id 1065217488.91586.3.camel@jester
обсуждение исходный текст
Ответ на Speeding up Aggregates  (Dror Matalon <dror@zapatec.com>)
Ответы Re: Speeding up Aggregates
Список pgsql-performance
> item_max_date() looks like this:
>    select max(dtstamp) from items where channel = $1 and link = $2;

It is too bad the (channel, link) index doesn't have dtstamp at the end
of it, otherwise the below query would be a gain (might be a small one
anyway).

  select dtstamp
    from items
   where channel = $1
     and link = $2
ORDER BY dtstamp DESC
   LIMIT 1;


Could you show us the exact specification of the function?  In
particular, did you mark it VOLATILE, IMMUTABLE, or STABLE?

I hope it isn't the first or second one ;)

Вложения

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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: Speeding up Aggregates
Следующее
От: Rob Nagler
Дата:
Сообщение: Re: reindex/vacuum locking/performance?