Re: Very slow queries w/ NOT IN preparation (seems like a bug, test case)

Поиск
Список
Период
Сортировка
От Sergey Konoplev
Тема Re: Very slow queries w/ NOT IN preparation (seems like a bug, test case)
Дата
Msg-id c3a7de1f0811120723x3169f747p5de78739b06a4eb3@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Very slow queries w/ NOT IN preparation (seems like a bug, test case)  ("Sergey Konoplev" <gray.ru@gmail.com>)
Ответы Re: Very slow queries w/ NOT IN preparation (seems like a bug, test case)  (Richard Huxton <dev@archonet.com>)
Список pgsql-general
>> What configure options did you use, what locale/encoding are you using,
>> what nondefault settings have you got in postgresql.conf?
>>
>>                        regards, tom lane
>
> You are right. I've found the odd thing (that completely drives me
> mad) in postgresql.conf.
>
> You are able to reproduce slow-not-in queries by switching
> constraint_exclusion to on in your postgresql.conf and running my test
> (which is attached to the first message).
>

On more thing:

If you do

EXPLAIN SELECT 1 FROM table1 WHERE table1_id NOT IN (SELECT column1
FROM (VALUES (123),(456),(789),... a lot of IDs here...)_);

it works as fast as with constraint_exclusion turned to off.

--
Regards,
Sergey Konoplev
--
PostgreSQL articles in english & russian
http://gray-hemp.blogspot.com/search/label/postgresql/

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Table bloat and vacuum
Следующее
От: "Markus Wollny"
Дата:
Сообщение: Suboptimal execution plan for simple query