Re: obtain the difference between successive rows

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: obtain the difference between successive rows
Дата
Msg-id 328.1350751850@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: obtain the difference between successive rows  (Raymond O'Donnell <rod@iol.ie>)
Ответы Re: obtain the difference between successive rows  (Raymond O'Donnell <rod@iol.ie>)
Список pgsql-general
"Raymond O'Donnell" <rod@iol.ie> writes:
> On 20/10/2012 17:23, Tom Lane wrote:
>> FWIW, Postgres is reasonably smart about the case of multiple window
>> functions with identical window definitions --- once you've got one
>> lag() in the query, adding more isn't going to cost much.

> Out of curiosity, would there be much difference between having multiple
> lag()s in the SELECT and a single one in a CTE?

Not sure what you're proposing?  I don't see how you'd solve this
problem with a CTE, at least not without a join, which seems unlikely
to be a win.

            regards, tom lane


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

Предыдущее
От: Chris Angelico
Дата:
Сообщение: Re: obtain the difference between successive rows
Следующее
От: Berend Tober
Дата:
Сообщение: Re: obtain the difference between successive rows