Re: Hashed IN only applied to first encountered IN

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: David Geier <geidav(dot)pg(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Hashed IN only applied to first encountered IN
Date: 2025-04-01 12:31:19
Message-ID: CAApHDvpmfXrcWvxpfJ7GtX=rD7L9H8Z5e6r=xXWESbR=HTJCsQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 2 Apr 2025 at 00:51, David Geier <geidav(dot)pg(at)gmail(dot)com> wrote:
> The hashed IN optimization is only applied to the first encountered
> ScalarArrayOpExpr during the expression tree traversal in
> convert_saop_to_hashed_saop_walker(). Reason being that the walker
> returns true which aborts the traversal.

> I've also attached a patch with a fix.

Thanks for the report and fix. On first inspection your patch looks
fine. I'll have a closer look tomorrow.

David

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2025-04-01 12:32:04 Re: RFC: Logging plan of the running query
Previous Message Alexander Korotkov 2025-04-01 12:07:59 Re: Replace IN VALUES with ANY in WHERE clauses during optimization