From: Jim C. Nasby <jim@nasby.net>
To: Dave Dutcher <dave@tridecap.com>
Cc: Tim Truman <tim@advam.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Forcing the use of particular execution plans
Date: Wed, 27 Sep 2006 15:13:50 -0500
Message-ID: <20060927201350.GS19827@nasby.net> (raw)
In-Reply-To: <007b01c6e24c$ccfc8190$8300a8c0@tridecap.com>
References: <000501c6e1ff$c80022c0$0340050a@sdg>
<007b01c6e24c$ccfc8190$8300a8c0@tridecap.com>
On Wed, Sep 27, 2006 at 10:51:26AM -0500, Dave Dutcher wrote:
> To make the planner prefer an index scan over a seq scan, I would first
> check the statistics again, and then you can try setting enable_seqscan to
> false (enable_seqscan is meant more for testing than production) or, you
> could try reducing random_page_cost, but you should test that against a
> range of queries before putting it in production.
Index scans are also pretty picky about correlation. If you have really
low correlation you don't want to index scan, but I think our current
estimates make it too eager to switch to a seqscan.
--
Jim Nasby jim@nasby.net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: jim@nasby.net, dave@tridecap.com, tim@advam.com
Subject: Re: Forcing the use of particular execution plans
In-Reply-To: <20060927201350.GS19827@nasby.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox