Re: [GENERAL] how to get accurate values in pg_statistic (continued)

От: Tom Lane
Тема: Re: [GENERAL] how to get accurate values in pg_statistic (continued)
Дата: ,
Msg-id: 11537.1062717375@sss.pgh.pa.us
(см: обсуждение, исходный текст)
Ответ на: [GENERAL] how to get accurate values in pg_statistic (continued)  (Mary Edie Meredith)
Ответы: Re: [GENERAL] how to get accurate values in pg_statistic  (Mary Edie Meredith)
Re: [GENERAL] how to get accurate values in pg_statistic (continued)  (Bruce Momjian)
Список: pgsql-performance

Скрыть дерево обсуждения

[GENERAL] how to get accurate values in pg_statistic (continued)  (Mary Edie Meredith, )
 Re: [GENERAL] how to get accurate values in pg_statistic  (Rod Taylor, )
  Re: [GENERAL] how to get accurate values in pg_statistic  (Neil Conway, )
   Re: [GENERAL] how to get accurate values in pg_statistic  (Mary Edie Meredith, )
   Re: [GENERAL] how to get accurate values in pg_statistic  (Rod Taylor, )
 Re: [GENERAL] how to get accurate values in pg_statistic (continued)  (Tom Lane, )
  Re: [GENERAL] how to get accurate values in pg_statistic  (Mary Edie Meredith, )
   Re: [GENERAL] how to get accurate values in pg_statistic  (Bruce Momjian, )
    Re: [GENERAL] how to get accurate values in pg_statistic  (Tom Lane, )
   Re: [GENERAL] how to get accurate values in pg_statistic  (Bruce Momjian, )
   Re: [GENERAL] how to get accurate values in pg_statistic  (Greg Stark, )
    Re: [GENERAL] how to get accurate values in pg_statistic  (Tom Lane, )
  Re: [GENERAL] how to get accurate values in pg_statistic (continued)  (Bruce Momjian, )
   Re: [osdldbt-general] Re: [GENERAL] how to get accurate  (Mary Edie Meredith, )
   Re: [osdldbt-general] Re: [GENERAL] how to get accurate  (Christopher Browne, )
  Re: [GENERAL] how to get accurate values in pg_statistic (continued)  (Christopher Browne, )
   Re: [GENERAL] how to get accurate values in pg_statistic (continued)  (Tom Lane, )
    Re: [GENERAL] how to get accurate values in pg_statistic  ("scott.marlowe", )
    Re: [GENERAL] how to get accurate values in pg_statistic  (Christopher Browne, )
     Re: [GENERAL] how to get accurate values in pg_statistic  ("scott.marlowe", )
 Re: [GENERAL] how to get accurate values in pg_statistic (continued)  (Tom Lane, )

Mary Edie Meredith <> writes:
> Stephan Szabo kindly responded to our earlier queries suggesting we look
> at default_statistics_target and ALTER TABLE ALTER COLUMN SET
> STATISTICS.

> These determine the number of bins in the histogram for a given column.
> But for a large number of rows (for example 6 million) the maximum value
> (1000) does not guarantee that ANALYZE will do a full scan of the table.
> We do not see a way to guarantee the same statistics run to run without
> forcing ANALYZE to examine every row of every table.

Do you actually still have a problem with the plans changing when the
stats target is above 100 or so?  I think the notion of "force ANALYZE
to do a full scan" is inherently wrongheaded ... it certainly would not
produce numbers that have anything to do with ordinary practice.

If you have data statistics that are so bizarre that the planner still
gets things wrong with a target of 1000, then I'd like to know more
about why.

            regards, tom lane


В списке pgsql-performance по дате сообщения:

От: Bruce Momjian
Дата:
Сообщение: Re: Query too slow
От: "Relaxin"
Дата:
Сообщение: Re: SELECT's take a long time compared to other DBMS