Re: Unworkable plan above certain row count

2022-04-27 Thread Tom Lane
=?iso-8859-1?Q?Andr=E9_H=E4nsel?= writes: > Now if you change > INSERT INTO a(a_id) SELECT generate_series(1, 2); > to > INSERT INTO a(a_id) SELECT generate_series(1, 20); > i.e. add a zero, the plan becomes [ not a hashed subplan ] Yeah, it won't hash the subplan if the estimated size of

Unworkable plan above certain row count

2022-04-27 Thread André Hänsel
I noticed an issue in a simple query with WHERE NOT IN (SELECT ...). I am aware that anti-joins with NOT IN are currently not optimized and should be rewritten as WHERE NOT EXISTS (SELECT ...), so if this is irrelevant please just ignore it. Here is a setup that works: CREATE TABLE a ( a_