Re: more support for various frame types of window functions

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: more support for various frame types of window functions
Date: 2009-11-09 10:09:09
Message-ID: 4AF7EA45.309@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hitoshi Harada wrote:
> That means moving average is initialized again on frame-off situation
> as the frame moves down. I know that may kill it's performance but
> reasons above result in my proposing design.

Yeah, we need the reinitialization support to handle the generic case.

One idea is to take a copy of the state datum after each row. Then,
instead of initializing the aggregate from scratch, you can "roll back"
to an earlier copied state. It doesn't always help, but might be a part
of the solution.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2009-11-09 10:15:31 Re: Typed tables
Previous Message Hitoshi Harada 2009-11-09 09:39:54 more support for various frame types of window functions