Re: index not used with subselect in where clause ?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: index not used with subselect in where clause ?
Дата
Msg-id 23743.987520162@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: index not used with subselect in where clause ?  ("Rod Taylor" <rod.taylor@inquent.com>)
Список pgsql-general
"Rod Taylor" <rod.taylor@inquent.com> writes:
> Adding a LIMIT 1 in the subplan may also help -- as you only need a
> single match to make it true so additional finds are useless -- it'll
> stop sooner or will be more likely to use an index than a full table
> scan.

I believe this is not necessary; the WHERE EXISTS(...) context is
sufficient to cue the planner that only one tuple will be retrieved,
and it will alter the subselect's plan accordingly.

            regards, tom lane

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

Предыдущее
От: Peter T Mount
Дата:
Сообщение: Re: JDBC & large Objects
Следующее
От: Matthew
Дата:
Сообщение: RE: failed sanity check, table answers was not found