Re: Row pattern recognition

From: Jacob Champion <jchampion(at)timescale(dot)com>
To: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>
Cc: er(at)xs4all(dot)nl, vik(at)postgresfriends(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Row pattern recognition
Date: 2023-09-12 22:09:29
Message-ID: CAAWbhmhrdYE2_wiqxF62E-Uf1NhcVbu24DcJ3peztEt2ZvkKEA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Sep 11, 2023 at 11:18 PM Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2023-09-12 22:47:10 Pre-proposal: unicode normalized text
Previous Message Jeff Davis 2023-09-12 20:55:22 Re: Faster "SET search_path"