Re: index / sequential scan problem

From: Dennis Björklund <db(at)zigo(dot)dhs(dot)org>
To: Fabian Kreitner <fabian(dot)kreitner(at)ainea-ag(dot)de>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: index / sequential scan problem
Date: 2003-07-18 05:25:54
Message-ID: Pine.LNX.4.44.0307180723040.4146-100000@zigo.dhs.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Fri, 18 Jul 2003, Fabian Kreitner wrote:

> Adjusting the cpu_tuple_cost to 0.042 got the planner to choose the index.

Doesn't sound very good and it will most likely make other queries slower.
You could always turn off sequential scan before that query and turn it on
after.

> Anything I need to consider when raising it to such "high" values?

You could fill the table with more data and it will probably come to a
point where it will stop using the seq. scan.

You could of course also change pg itself so it calculates a better
estimate.

--
/Dennis

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Shridhar Daithankar 2003-07-18 06:35:54 Re: Sanity check requested
Previous Message Fabian Kreitner 2003-07-18 05:18:27 Re: index / sequential scan problem