Re: small table left outer join big table

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: small table left outer join big table
Дата
Msg-id 9856.1293634772@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: small table left outer join big table  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: small table left outer join big table  (Simon Riggs <simon@2ndQuadrant.com>)
Re: small table left outer join big table  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Wed, Dec 29, 2010 at 7:34 AM, Simon Riggs <simon@2ndquadrant.com> wrote:
>> It's not a bug, that's the way it currently works. We don't need a test
>> case for that.

> Oh, you're right.  I missed the fact that it's a left join.

The only thing that struck me as curious about it was that the OP didn't
get a nestloop-with-inner-indexscan plan.  That would be explainable if
there was no index on the large table's "id" column ... but columns
named like that usually have indexes.

I can't get all *that* excited about complicating hash joins as
proposed.  The query is still fundamentally going to be slow because
you won't get out of having to seqscan the large table.  The only way
to make it really fast is to not read all of the large table, and
nestloop-with-inner-indexscan is the only plan type with a hope of
doing that.
        regards, tom lane


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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: Libpq PGRES_COPY_BOTH - version compatibility
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_dump --split patch