Re: Why Postgres use a little memory on Windows.

Список
Период
Сортировка
От Tom Lane
Тема Re: Why Postgres use a little memory on Windows.
Дата
Msg-id 23887.1455993431@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Why Postgres use a little memory on Windows.  (Adrian Klaver)
Ответы Re: Why Postgres use a little memory on Windows.  (Francisco Olarte)
Список pgsql-general
Дерево обсуждения
Why Postgres use a little memory on Windows.  (tuanhoanganh, )
 Re: Why Postgres use a little memory on Windows.  (Adrian Klaver, )
  Re: Why Postgres use a little memory on Windows.  (Tom Lane, )
   Re: Why Postgres use a little memory on Windows.  (Francisco Olarte, )
  Re: Why Postgres use a little memory on Windows.  (Francisco Olarte, )
   Re: Why Postgres use a little memory on Windows.  (Adrian Klaver, )
 Re: [PERFORM] Why Postgres use a little memory on Windows.  (Jeff Janes, )
  Re: [PERFORM] Why Postgres use a little memory on Windows.  (tuanhoanganh, )
Adrian Klaver <> writes:
> Took liberty of reformatting the above here:
> ...
> FROM
>      sym_data d INNER JOIN sym_data_gap g ON g.status = 'GP'
>      AND d.data_id BETWEEN g.start_id
>      AND g.end_id
> WHERE
>      d.channel_id = 'sale_transaction'
> ORDER BY
>      d.data_id ASC;

> The thing that stands out to me is that I do not see that sym_data and
> sym_data_gp are actually joined on anything.

The "d.data_id BETWEEN g.start_id AND g.end_id" part is a join condition
... but not one that can be handled by either hash or merge join, because
those require simple equality join conditions.  So the nestloop plan shown
here is really about as good as you're going to get without redesigning
the query and/or the data representation.

It looks like the bitmap heap scan generally returns exactly one row for
each outer row, which makes me wonder if the BETWEEN couldn't be replaced
with some sort of equality.  But that might take some rethinking of the
data.

            regards, tom lane


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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Why Postgres use a little memory on Windows.
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: [PERFORM] Why Postgres use a little memory on Windows.