Re: Re: Slow SELECT...IN statements

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Re: Slow SELECT...IN statements
Дата
Msg-id 10130.985381568@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Slow SELECT...IN statements  ("Matt Friedman" <matt@daart.ca>)
Список pgsql-general
"Matt Friedman" <matt@daart.ca> writes:
> I am working on a select that would use the IN statement as you can view
> below.

> WHERE
>   index_word.word IN ('radio','spry')

The above is perfectly OK.  It's really just a shorthand for
    index_word.word = 'radio' OR index_word.word = 'spry'
anyway.

> After reading this thread, which says that the IN statement is "slow" I am
> wondering how I would rewrite using "EXISTS...IN"

The thread was about "foo IN (SELECT ...)".  A sub-select IN is a
completely different animal from IN (list-of-values).

            regards, tom lane

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

Предыдущее
От: "Matt Friedman"
Дата:
Сообщение: Re: Slow SELECT...IN statements
Следующее
От: Tom Lane
Дата:
Сообщение: Re: indexes not working very well