Re: Very slow inner join query Unacceptable latency.

Поиск
Список
Период
Сортировка
От Jaime Casanova
Тема Re: Very slow inner join query Unacceptable latency.
Дата
Msg-id CAJKUy5jN1wt9f0WG3eedrR26BbbSKg3UGRX-am7DYDDfWT8=nQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Very slow inner join query Unacceptable latency.  (<fburgess@radiantblue.com>)
Список pgsql-performance
On Thu, May 23, 2013 at 12:21 PM,  <fburgess@radiantblue.com> wrote:
>
> But what negative impact is disabling hash joins?
>

doing it just for a single query, could be a tool for solving
particular problems.
setting it in postgresql.conf, therefore affecting all queries, is
like using a hammer to change tv channel... it will cause more
problems than the one it solves.

what you can do is:

1) execute:

SET enable_hashjoin TO OFF;
SELECT here
RESET enable_hashjoin TO ON;

2) in a function:

CREATE FUNCTION do_something() RETURNS bigint AS
$$
   SELECT here
$$ LANGUAGE sql SET enable_hashjoin TO OFF STABLE;

--
Jaime Casanova         www.2ndQuadrant.com
Professional PostgreSQL: Soporte 24x7 y capacitación
Phone: +593 4 5107566         Cell: +593 987171157


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

Предыдущее
От: james
Дата:
Сообщение: Re: Performance of complicated query
Следующее
От: Jonathan Morra
Дата:
Сообщение: Re: Performance of complicated query