Re: insane index scan times

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: insane index scan times
Дата
Msg-id 20070608230843.GC23222@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: insane index scan times  ("Alexander Staubo" <alex@purefiction.net>)
Ответы Re: insane index scan times
Список pgsql-general
Alexander Staubo escribió:
> On 6/8/07, Martijn van Oosterhout <kleptog@svana.org> wrote:
> >On Thu, Jun 07, 2007 at 11:20:20AM -0700, Sergei Shelukhin wrote:
> >> Version is 8.1
> >> The query I originally ran returned ~4-5 rows and had a lot of other
> >> joins and filtering conditions prior to the join with the big table.
> >> Is there any way to instruct postgres to do joins in the specific
> >> order or smth?
> >
> >Not really, Postgres can rearrange joins into the order it works out to
> >be the best.
>
> Are you sure? I was under the impression that PostgreSQL could reorder
> "where" clauses, but did not  yet reorder explicit joins (as opposed
> to implicit ones through, say, "in"). But perhaps it only applied to
> some types of joins.

Postgres does flatten joins, and reorders the resulting range tables as
convenient.  Only in 8.2 it learned how to to reorder outer joins, but
for inner joins this has been in place for a lot longer.

--
Alvaro Herrera                        http://www.advogato.org/person/alvherre
"No deja de ser humillante para una persona de ingenio saber
que no hay tonto que no le pueda enseñar algo." (Jean B. Say)

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

Предыдущее
От: Rodrigo De León
Дата:
Сообщение: Re: parametered views
Следующее
От: felix@crowfix.com
Дата:
Сообщение: Re: Wider than float8