Skip site navigation (1) Skip section navigation (2)

Re: Forcing the use of particular execution plans

From: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
To: Dave Dutcher <dave(at)tridecap(dot)com>
Cc: 'Tim Truman' <tim(at)advam(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Forcing the use of particular execution plans
Date: 2006-09-27 20:13:50
Message-ID: 20060927201350.GS19827@nasby.net (view raw or flat)
Thread:
Lists: pgsql-performance
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(at)nasby(dot)net
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)

In response to

Responses

pgsql-performance by date

Next:From: Bill MoranDate: 2006-09-27 20:27:56
Subject: Re: autovacuum on a -mostly- r/o table
Previous:From: Tobias BroxDate: 2006-09-27 19:01:45
Subject: Re: Merge Join vs Nested Loop

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group