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

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Very slow queries w/ NOT IN preparation (seems like a bug, test case)
Дата
Msg-id 49196678.1080501@archonet.com
обсуждение исходный текст
Ответ на 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)  ("Sergey Konoplev" <gray.ru@gmail.com>)
Список pgsql-general
Sergey Konoplev wrote:
>
> I've faced strange parser (or may be planner) behaviour. When I do
> "EXPLAIN SELECT 1 FROM table1 WHERE table1_id IN (...~2000 ids
> here...);" it works as fast as I expect (50 ms). But when I rewrite it
> using NOT IN "EXPLAIN SELECT 1 FROM table1 WHERE table1_id NOT IN
> (...~2000 ids here...);" it gets much more slower (34537 ms).

Can you post the EXPLAIN ANALYSE output from your NOT IN query?

--
  Richard Huxton
  Archonet Ltd

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

Предыдущее
От: "Andrus"
Дата:
Сообщение: Re: Current log files when rotating?
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: LIKE, "=" and fixed-width character fields