Re: indexes are farked - Mailing list pgsql-general

From Michael Fuhr
Subject Re: indexes are farked
Date
Msg-id 20050802190858.GA74118@winnie.fuhr.org
Whole thread Raw
In response to Re: indexes are farked  (Scott Marlowe <smarlowe@g2switchworks.com>)
List pgsql-general
On Tue, Aug 02, 2005 at 01:41:48PM -0500, Scott Marlowe wrote:
> Also, you might want to look at tuning your database.  I've found that
> on machines that can cache most of their data sets, adjusting things
> like effective_cache_size and random_page_cost makes a big difference.

Also, as Ragnar Hafstað suggested, consider increasing the statistics
target on the column in question.  The row estimate (27833) was
over five times higher than the actual number of rows (5261),
resulting in an overinflated cost estimate for an index scan.
Increasing the statistics should help the planner make a more
accurate estimate.  Here are some useful links:

http://www.postgresql.org/docs/7.3/static/performance-tips.html#USING-EXPLAIN
http://www.postgresql.org/docs/7.3/static/planner-stats.html
http://developer.postgresql.org/docs/postgres/planner-stats-details.html

The last link will be in the documentation for 8.1 when it's released,
but I think it largely applies to earlier versions as well.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Problem with dropping a tablespace
Next
From: Tom Lane
Date:
Subject: Re: Slow Inserts on 1 table?