Re: Row pattern recognition - Mailing list pgsql-hackers

From Jacob Champion
Subject Re: Row pattern recognition
Date
Msg-id CAAWbhmhrdYE2_wiqxF62E-Uf1NhcVbu24DcJ3peztEt2ZvkKEA@mail.gmail.com
Whole thread Raw
In response to Re: Row pattern recognition  (Tatsuo Ishii <ishii@sraoss.co.jp>)
List pgsql-hackers
On Mon, Sep 11, 2023 at 11:18 PM Tatsuo Ishii <ishii@sraoss.co.jp> wrote:
> What I am not sure about is, you and Vik mentioned that the
> traditional NFA is superior that POSIX NFA in terms of performance.
> But how "lexicographic ordering" is related to performance?

I think they're only tangentially related. POSIX NFAs have to fully
backtrack even after the first match is found, so that's where the
performance difference comes in. (We would be introducing new ways to
catastrophically backtrack if we used that approach.) But since you
don't visit every possible path through the graph with a traditional
NFA, it makes sense to define an order in which you visit the nodes,
so that you can reason about which string is actually going to be
matched in the end.

> BTW, attched is the v6 patch. The differences from v5 include:
>
> - Now aggregates can be used with RPR. Below is an example from the
>   regression test cases, which is added by v6 patch.

Great, thank you!

--Jacob



pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: Faster "SET search_path"
Next
From: Jeff Davis
Date:
Subject: Pre-proposal: unicode normalized text