Re: Slow performance with join on many fields

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Slow performance with join on many fields
Дата
Msg-id 20975.1046759262@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Slow performance with join on many fields  (Alex Johnson <alex@aretesystems.com>)
Ответы Re: Slow performance with join on many fields  (Alex Johnson <alex@aretesystems.com>)
Список pgsql-performance
Alex Johnson <alex@aretesystems.com> writes:
> I'm looking at the following query that joins these three
> tables:

> SELECT ...
> FROM
>       (tbl_samples
>            INNER JOIN tbl_tests USING ...
>       )
>       INNER JOIN tbl_results USING ...

You're forcing the join order; perhaps another order is preferable?  See
http://www.ca.postgresql.org/users-lounge/docs/7.3/postgres/explicit-joins.html

> This is the output from EXPLAIN:

EXPLAIN ANALYZE output would've been more useful (it would have shown
whether a different join order would be better, for one thing).

> I've done the following to try to improve performance:
>     increased shared_buffers to 384

That's on the picayune side yet.  1000 buffers or so is where you want
to be, I think.  Also, have you run ANALYZE or VACUUM ANALYZE lately?

            regards, tom lane

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

Предыдущее
От: Alex Johnson
Дата:
Сообщение: Slow performance with join on many fields
Следующее
От: Alex Johnson
Дата:
Сообщение: Re: Slow performance with join on many fields