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