| От | Tom Lane |
|---|---|
| Тема | Re: IN surpasses NOT EXISTS in 7.4RC2 ?? |
| Дата | |
| Msg-id | 26331.1068736791@sss.pgh.pa.us обсуждение |
| Ответ на | IN surpasses NOT EXISTS in 7.4RC2 ?? (Rajesh Kumar Mallah <mallah@trade-india.com>) |
| Ответы |
Re: IN surpasses NOT EXISTS in 7.4RC2 ??
|
| Список | pgsql-performance |
Rajesh Kumar Mallah <mallah@trade-india.com> writes:
> NOT EXISTS is taking almost double time than NOT IN .
> I know IN has been optimised in 7.4 but is anything
> wrong with the NOT EXISTS?
That's the expected behavior in 7.4. EXISTS in the style you are using
it effectively forces a nestloop-with-inner-indexscan implementation.
As of 7.4, IN can do that, but it can do several other things too,
including the hash-type plan you have here. So assuming that the
planner chooses the right plan choice (not always a given ;-))
IN should be as fast or faster than EXISTS in all cases.
regards, tom lane
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера