Re: Problems with estimating OR conditions, IS NULL on LEFT JOINs

Поиск
Список
Период
Сортировка
От Andrey Lepikhov
Тема Re: Problems with estimating OR conditions, IS NULL on LEFT JOINs
Дата
Msg-id 6ed3a29e-b4b9-e4b6-e8a1-b1d7d00bbd88@postgrespro.ru
обсуждение исходный текст
Ответ на Re: Problems with estimating OR conditions, IS NULL on LEFT JOINs  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
Ответы Re: Problems with estimating OR conditions, IS NULL on LEFT JOINs  (Alena Rybakina <lena.ribackina@yandex.ru>)
Список pgsql-hackers
On 24/6/2023 17:23, Tomas Vondra wrote:
> I really hope what I just wrote makes at least a little bit of sense.
Throw in one more example:

SELECT i AS id INTO l FROM generate_series(1,100000) i;
CREATE TABLE r (id int8, v text);
INSERT INTO r (id, v) VALUES (1, 't'), (-1, 'f');
ANALYZE l,r;
EXPLAIN ANALYZE
SELECT * FROM l LEFT OUTER JOIN r ON (r.id = l.id) WHERE r.v IS NULL;

Here you can see the same kind of underestimation:
Hash Left Join  (... rows=500 width=14) (... rows=99999 ...)

So the eqjoinsel_unmatch_left() function should be modified for the case 
where nd1<nd2.

-- 
regards,
Andrey Lepikhov
Postgres Professional




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: 'converts internal representation to "..."' comment is confusing
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Clean up command argument assembly