Re: Row pattern recognition - Mailing list pgsql-hackers

From Henson Choi
Subject Re: Row pattern recognition
Date
Msg-id CAAAe_zCMZKTPq74Uhq-JSdNE9kAbhtA3NSXPOcwr0W31KFeVdw@mail.gmail.com
Whole thread
In response to Re: Row pattern recognition  (Tatsuo Ishii <ishii@postgresql.org>)
List pgsql-hackers
Hi Tatsuo,

Thanks -- I'll go in this direction; your sketch has the shape of it.

> Yes, I think the direction is correct. Probably the patch would someting
> like this?
>
> + update_reduced_frame(winstate->nav_winobj,
> + winstate->frameheadpos);

Right: drive the match once per row, up front, instead of letting frame
access drive it.  That's the plan, with two refinements on top of the sketch.

First, a small refactor: I'll pull the reduced-frame loop and the mark
advance out into their own functions, called once per row before the window
functions run -- so the match tracks the row scan rather than frame reads.

Second, the mark: I'll advance it per NFA row from the match frontier rather
than the output row, so the tuplestore is trimmed as soon as the match is
done with each row.

Thanks,
Henson

pgsql-hackers by date:

Previous
From: Etsuro Fujita
Date:
Subject: Re: use of SPI by postgresImportForeignStatistics
Next
From: Hans Buschmann
Date:
Subject: AW: PG19beta1: GCC 16.1.1 warning: ‘actual_arg_types’ may be used uninitialized in clauses.c