Re: SQL:2003 Window Functions for postgresql 8.3?

Поиск
Список
Период
Сортировка
Martijn van Oosterhout <kleptog@svana.org> writes:
> The main thing I want to use them for is for cumulative output.
> ...
> With window functions you define for each row a "window" which is from
> the beginning of the table to that row and then sum the values, for
> each row. Then you just divide by the total, nice.

Egad.  Wouldn't that involve O(N) memory and O(N^2) operations?
Perhaps an extremely smart optimizer could improve this using knowledge
of the specific aggregates' behaviors, but for "black box" aggregates
it sounds pretty unworkable.

            regards, tom lane

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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: SQL:2003 Window Functions for postgresql 8.3?
Следующее
От: Ben
Дата:
Сообщение: Re: SQL:2003 Window Functions for postgresql 8.3?