Replace IN VALUES with ANY in WHERE clauses during optimization

Edit
ID 5283
Title Replace IN VALUES with ANY in WHERE clauses during optimization
Topic Performance
Created 2024-10-07 19:08:07
Last modified 2024-12-11 03:49:41 (1 week, 3 days ago)
Latest email 2024-11-11 17:29:14 (1 month, 1 week ago)
Status
2025-01: Needs review
2024-11: Moved to next CF
Target version 18
Authors Andrei Lepikhov (lepikhov), Alena Rybakina (a.rybakina)
Reviewers newtglobal postgresql_contributors (newtpostgrescontributors)Become reviewer
Committer
Links CFbot results (CirrusCI) CFbot GitHub
Checkout latest CFbot patchset Go to your local checkout of the PostgreSQL repository and run:
git remote add commitfest https://github.com/postgresql-cfbot/postgresql.git
git fetch commitfest cf/5283
git checkout commitfest/cf/5283
Emails
Replace IN VALUES with ANY in WHERE clauses during optimization
First at 2024-10-03 19:52:48 by Ivan Kush <ivan.kush at tantorlabs.com>
Latest at 2024-11-11 17:29:14 by Ivan Kush <ivan.kush at tantorlabs.com>
Latest attachment (0001-Introduce-VALUES-ARRAY-transformation.patch) at 2024-10-04 09:05:01 from Andrei Lepikhov <lepihov at gmail.com>
    Attachment (0001-Introduce-VALUES-ARRAY-transformation.patch) at 2024-10-04 09:05:01 from Andrei Lepikhov <lepihov at gmail.com> (Patch: Yes)
    Attachment (commands.sql) at 2024-10-03 19:52:48 from Ivan Kush <ivan.kush at tantorlabs.com> (Patch: No)

Annotations

When Who Mail Annotation
2024-12-11 03:49:41 newtglobal postgresql_contributors (newtpostgrescontributors) From Ivan Kush <ivan.kush@tantorlabs.com>
at 2024-10-03 19:52:48
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
History
When Who What
2024-12-11 03:49:41 newtglobal postgresql_contributors (newtpostgrescontributors) Added annotation "I tested the patch with `commands.sql` and observed noticeable improvements in planning and [...]" to 0184212d-1248-4f1f-a42d-f5cb1c1976d2@tantorlabs.com
2024-12-09 03:54:03 newtglobal postgresql_contributors (newtpostgrescontributors) Added newtpostgrescontributors as reviewer
2024-12-02 13:58:52 Dmitry Dolgov (erthalion) Closed in commitfest 2024-11 with status: Moved to next CF
2024-10-07 19:09:29 Alena Rybakina (alenka) Changed authors to Andrei Lepikhov (lepikhov), Alena Rybakina (a.rybakina)
2024-10-07 19:09:28 Alena Rybakina (alenka) Changed targetversion to 18
2024-10-07 19:08:07 Alena Rybakina (alenka) Attached mail thread 0184212d-1248-4f1f-a42d-f5cb1c1976d2@tantorlabs.com
2024-10-07 19:08:07 Alena Rybakina (alenka) Created patch record
Edit