Re: Some ExecSeqScan optimizations

David Rowley <dgrowleyml@gmail.com>

From: David Rowley <dgrowleyml@gmail.com>
To: Vladlen Popolitov <v.popolitov@postgrespro.ru>
Cc: Amit Langote <amitlangote09@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>, Junwang Zhao <zhjwpku@gmail.com>
Date: 2025-01-10T10:36:12Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Refactor ExecScan() to allow inlining of its core logic

On Fri, 10 Jan 2025 at 22:53, Vladlen Popolitov
<v.popolitov@postgrespro.ru> wrote:
>   In case of query
> select count(*) from test_table where a_1 = 1000000;
> I would expect increase of query time due to additional if...else . It
> is not clear
> what code was eliminated to decrease query time.

Are you talking about the code added to ExecInitSeqScan() to determine
which node function to call? If so, that's only called during executor
startup.  The idea here is to reduce the branching during execution by
calling one of those special functions which has a more specialised
version of the ExecScan code for the particular purpose it's going to
be used for.

David