Re: Estimation rows of FULL JOIN

2023-12-20 Thread Tom Lane
Danil Anisimow writes: > In some cases, the planner underestimates FULL JOIN. Perhaps. > Are these simple changes enough to improve this situation? This looks like an entirely ad-hoc change, one that could make as many cases worse as it makes better. If you want to argue for merging it, you at

Estimation rows of FULL JOIN

2023-12-20 Thread Danil Anisimow
Hi. In some cases, the planner underestimates FULL JOIN. Example: postgres=# CREATE TABLE t AS SELECT x AS a, null AS b FROM generate_series(1, 10) x; postgres=# ANALYZE; postgres=# EXPLAIN (ANALYZE, TIMING OFF) SELECT * FROM t t1 FULL JOIN t t2 ON t1.b = t2.b;