Re: change sample size for statistics

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: change sample size for statistics
Дата
Msg-id BANLkTinre-NTvXTsMqnw6+LrKJO0ex0_OA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: change sample size for statistics  (Willy-Bas Loos <willybas@gmail.com>)
Список pgsql-performance
On Mon, Jun 13, 2011 at 6:33 PM, Willy-Bas Loos <willybas@gmail.com> wrote:
> On Fri, Jun 10, 2011 at 9:58 PM, Josh Berkus <josh@agliodbs.com> wrote:
>>
>> It's not 10%.  We use a fixed sample size, which is configurable on the
>> system, table, or column basis.
>
> It seems that you are referring to "alter column set statistics" and
> "default_statistics_target", which are the number of percentiles in the
> histogram  (and MCV's) .
> I mean the number of records that are scanned by analyze to come to the
> statistics for the planner, especially n_disctict.

In 9.0+ you can do ALTER TABLE .. ALTER COLUMN .. SET (n_distinct = ...);

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

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

Предыдущее
От: Greg Smith
Дата:
Сообщение: Re: Slow performance when querying millions of rows
Следующее
От: Svetlin Manavski
Дата:
Сообщение: is parallel union all possible over dblink?