Re: Poor performance when joining against inherited tables

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Poor performance when joining against inherited tables
Дата
Msg-id 508.1305133226@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Poor performance when joining against inherited tables  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-performance
Robert Haas <robertmhaas@gmail.com> writes:
> A more interesting question is why you're not getting a plan like this:

> Nested Loop
> -> Seq Scan on objects
> -> Append
>    ->  Index Scan using xxx_pkey on itemXX
>    ->  Index Scan using yyy_pkey on itemYY
>    ->  Index Scan using zzz_pkey on itemZZ

Probably because there are 4 million rows in the objects table.

Or maybe it's a pre-8.2 database and can't even generate such a plan.
But if it did generate it, it would almost certainly have decided that
this was more expensive than a hash or merge join.

People have this weird idea that the existence of an index ought to make
enormous joins free ...

            regards, tom lane

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Poor performance when joining against inherited tables
Следующее
От: "Pierre C"
Дата:
Сообщение: Re: Postgres refusing to use >1 core