Search Postgresql Archives

Re: indexes are farked

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux