Re: Index usage question

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Index usage question
Дата
Msg-id 27626.999628294@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Index usage question  (Jefim Matskin <mjefim@sphera.com>)
Список pgsql-general
Jefim Matskin <mjefim@sphera.com> writes:
> can anyone explain me what is wrong with my query?

Nothing.  Hash join is a perfectly respectable way to implement this
query.  If the size estimates quoted in the EXPLAIN are in the right
ballpark, I'd not be surprised to find that the planner made the right
choice --- nestloop will certainly be slower, and there's no reason to
think that a merge join based on index scans would be faster either.

You can try "set enable_hashjoin to off" if you want to experiment with
alternate plans, but you should check the actual timing before assuming
that you know better than the planner.

            regards, tom lane

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

Предыдущее
От: "Mitch Vincent"
Дата:
Сообщение: Re: Index usage question
Следующее
От: "Alex Knight"
Дата:
Сообщение: Re: PL/java?