Re: BUG #18851: Queries with xxx NOT IN (SELECT xxx FROM table) fail to run (or run very slowly) on v17 (v14 ok) - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #18851: Queries with xxx NOT IN (SELECT xxx FROM table) fail to run (or run very slowly) on v17 (v14 ok)
Date
Msg-id 3086084.1741971414@sss.pgh.pa.us
Whole thread Raw
In response to BUG #18851: Queries with xxx NOT IN (SELECT xxx FROM table) fail to run (or run very slowly) on v17 (v14 ok)  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> I have experienced a misbehaviour (IMHO) in PostgreSQL 17 that didn't occur
> in PostgreSQL 14.

What have you got work_mem set to in the two installations?

For me, both versions switch to the cheap hashed plan if work_mem
is large enough that the inner table is estimated to fit in it
(somewhere around 10MB-20MB for this specific example).  If anything
the newer code seems to have a smaller threshold.

            regards, tom lane



pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: ISN extension - wrong volatility level for isn_weak() function
Next
From: Daniel Gustafsson
Date:
Subject: Re: BUG #18845: DEREF_OF_NULL.RET guc_malloc possibly returns NULL