pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: joan@sanchezsabe.com
Cc: pgsql-bugs@lists.postgresql.org
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: Fri, 14 Mar 2025 12:56:54 -0400
Message-ID: <3086084.1741971414@sss.pgh.pa.us> (raw)
In-Reply-To: <18851-5a0a9801290135d7@postgresql.org>
References: <18851-5a0a9801290135d7@postgresql.org>

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





view thread (2+ messages)

Message-ID: <3086084.1741971414@sss.pgh.pa.us>
Permalink:  ../3086084.1741971414@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3086084.1741971414@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, joan@sanchezsabe.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18851: Queries with xxx NOT IN (SELECT xxx FROM table) fail to run (or run very slowly) on v17 (v14 ok)
  In-Reply-To: <3086084.1741971414@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox