Re: Query not using index pgsql 8.2.3

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: Query not using index pgsql 8.2.3
Дата
Msg-id 20070323134321.GA86039@winnie.fuhr.org
обсуждение исходный текст
Ответ на Re: Query not using index pgsql 8.2.3  (Henrik Zagerholm <henke@mac.se>)
Список pgsql-general
On Fri, Mar 23, 2007 at 02:13:57PM +0100, Henrik Zagerholm wrote:
> I'm just amazed that setting the statistics threshold on one column
> mad all the difference. IS there any guidelines on what columns I
> should change the statistics on?

Start by looking for columns involved in simple comparisons with a
constant -- especially if you know that the distribution of values
is uneven -- and see how far off the row count estimate is for
various values.  You can use simple queries such as

EXPLAIN ANALYZE SELECT 1 FROM tbl_file WHERE fk_filetype_id = 83;

To learn more read "How the Planner Uses Statistics" in the
documentation:

http://www.postgresql.org/docs/8.2/interactive/planner-stats-details.html

Among the configuration settings to consider changing are shared_buffers,
effective_cache_size, work_mem, and random_page_cost.  The following
is a good starting point:

http://www.powerpostgresql.com/PerfList

If you have additional performance-related questions then consider
posting to pgsql-performance.

--
Michael Fuhr

В списке pgsql-general по дате отправления:

Предыдущее
От: Henrik Zagerholm
Дата:
Сообщение: Re: Query not using index pgsql 8.2.3
Следующее
От: Mark
Дата:
Сообщение: question: knopixx and postgresql on flash drive