>>> 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