Re: integrate pg_upgrade analyze_new_cluster.sh into vacuumdb

Поиск
Список
Период
Сортировка
От Oskari Saarenmaa
Тема Re: integrate pg_upgrade analyze_new_cluster.sh into vacuumdb
Дата
Msg-id 52DEA928.9000203@ohmu.fi
обсуждение исходный текст
Ответ на integrate pg_upgrade analyze_new_cluster.sh into vacuumdb  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: integrate pg_upgrade analyze_new_cluster.sh into vacuumdb  (Jeff Janes <jeff.janes@gmail.com>)
Список pgsql-hackers
09.01.2014 05:15, Peter Eisentraut kirjoitti:
> pg_upgrade creates a script analyze_new_cluster.{sh|bat} that runs
> vacuumdb --analyze-only in three stages with different statistics target
> settings to get a fresh cluster analyzed faster.  I think this behavior
> is also useful for clusters or databases freshly created by pg_restore
> or any other loading mechanism, so it's suboptimal to have this
> constrained to pg_upgrade.

I think the three stage analyze is a wrong solution to the "slow 
analyze" problem.  In my experience most of the analyze time goes to 
reading random blocks from the disk but we usually use only a small 
portion of that data (1 row per block.)

If we were able to better utilize the data we read we could get good 
statistics with a lot less IO than we currently need.  This was 
discussed in length at
http://www.postgresql.org/message-id/CAM-w4HOjRbNPMW=SHjHw_Qfapcuu5Ege1tMdR0ZQU+kqX8Qeug@mail.gmail.com 
but it hasn't turned into patches so far.

/ Oskari




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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Closing commitfest 2013-11
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: [9.3 bug] disk space in pg_xlog increases during archive recovery