Re: Ramifications of turning off Nested Loops for slow queries

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Ramifications of turning off Nested Loops for slow queries
Дата
Msg-id 47CD2203.EE98.0025.0@wicourts.gov
обсуждение исходный текст
Ответ на Ramifications of turning off Nested Loops for slow queries  (Chris Kratz <chris.kratz@vistashare.com>)
Ответы Re: Ramifications of turning off Nested Loops for slow queries  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Ramifications of turning off Nested Loops for slow queries  ("Chris Kratz" <chris.kratz@vistashare.com>)
Список pgsql-performance
>>> On Tue, Mar 4, 2008 at  8:42 AM, in message
<483ACAF5-A485-40D9-9D7E-7008EF12F909@vistashare.com>, Chris Kratz
<chris.kratz@vistashare.com> wrote:

> So, I've now been asked to ping the list as to whether turning off
> nested loops system wide is a bad idea, and why or why not.

In our environment, the fastest plan for a lot of queries involve
nested loops.  Of course, it's possible that these never provide the
fasted plan in your environment, but it seems very unlikely --
you're just not noticing the queries where it's doing fine.

> Any other thoughts or suggestions?

Make sure your effective_cache_size is properly configured.

Increase random_page_cost and/or decrease seq_page_cost.
You can play with the cost settings on a connection, using EXPLAIN
on the query, to see what plan you get with each configuration
before putting it into the postgresql.conf file.

-Kevin




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

Предыдущее
От: Theo Kramer
Дата:
Сообщение: PostgreSQL performance on a virtual host
Следующее
От: Greg Smith
Дата:
Сообщение: Re: Performance tuning on FreeBSD