Re: index not used with subselect in where clause ?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: index not used with subselect in where clause ?
Дата
Msg-id 23561.987517995@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: index not used with subselect in where clause ?  (Christian Fritze <The.Finn@sprawl.de>)
Список pgsql-general
Christian Fritze <The.Finn@sprawl.de> writes:
>    explain select * from allmain where exists (select distinct
>    dokids_as_int from allslwfull where dokids_as_int = idn and
>    wort_nouml_lower like 'gen%')

Try dropping the "distinct" on the inner select.  As a moment's thought
will reveal, it's not buying you anything; and it's costing you sort
and unique passes over the subplan result.

            regards, tom lane

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

Предыдущее
От: Rini Dutta
Дата:
Сообщение: drastic reduction in speed of inserts as the table grows
Следующее
От: Tom Lane
Дата:
Сообщение: Re: parse error at or near $1