Re: more support for various frame types of window functions - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: more support for various frame types of window functions
Date
Msg-id 4AF7EA45.309@enterprisedb.com
Whole thread Raw
In response to more support for various frame types of window functions  (Hitoshi Harada <umi.tanuki@gmail.com>)
Responses Re: more support for various frame types of window functions
Re: more support for various frame types of window functions
List 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


pgsql-hackers by date:

Previous
From: Hitoshi Harada
Date:
Subject: more support for various frame types of window functions
Next
From: Peter Eisentraut
Date:
Subject: Re: Typed tables