Re: Replace IN VALUES with ANY in WHERE clauses during optimization

From: newtglobal postgresql_contributors <postgresql_contributors(at)newtglobalcorp(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Cc: Andrei Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru>, Alena Rybakina <lena(dot)ribackina(at)yandex(dot)ru>
Subject: Re: Replace IN VALUES with ANY in WHERE clauses during optimization
Date: 2025-02-27 11:09:02
Message-ID: 174065454278.654.1011593946047422922.pgcf@coridan.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The following review has been posted through the commitfest application:
make installcheck-world: tested, failed
Implements feature: tested, failed
Spec compliant: tested, failed
Documentation: tested, failed

Hi Ivan Kush
I tested the patch with `commands.sql` and observed noticeable improvements in planning and execution time, especially with multiple tables. Even single-table queries show small time reductions (0.02–0.04 ms). The patch optimizes `IN` clauses effectively, particularly with `VALUES`. For example, `col IN (VALUES ('a'), ('b'), ('c'))` now behaves similarly to `col IN ('a', 'b', 'c')`, leading to faster execution and reduced planning overhead.
Regards,
Postgresql Contributors - NewtGlobal

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message newtglobal postgresql_contributors 2025-02-27 11:09:49 Re: New "raw" COPY format
Previous Message Ranier Vilela 2025-02-27 11:05:07 Re: Fix api misuse (src/bin/pg_amcheck/pg_amcheck.c)