Re: indexes are farked

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: indexes are farked
Дата
Msg-id 20050802190858.GA74118@winnie.fuhr.org
обсуждение исходный текст
Ответ на Re: indexes are farked  (Scott Marlowe <smarlowe@g2switchworks.com>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Problem with dropping a tablespace
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Slow Inserts on 1 table?