Re: Stats update difference between VACUUM ANALYZE and ANALYZE in 9.2?

Поиск
Список
Период
Сортировка
От
Тема Re: Stats update difference between VACUUM ANALYZE and ANALYZE in 9.2?
Дата
Msg-id 1423451870.4806251.1474903058852@mail.yahoo.com
обсуждение исходный текст
Ответ на Re: Stats update difference between VACUUM ANALYZE and ANALYZE in 9.2?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Monday, September 26, 2016 9:44 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

 >> Paul Jones <pbj@cmicdo.com> writes:
 >> For a freshly pg_restore'd 9.2 database, would VACUUM ANALYZE update
 >> statistics any better than just an ANALYZE?

 >
 > VACUUM would have caused the page-all-visible flags to get set for all
 > pages of unchanging tables.  I don't recall whether ANALYZE has any side
 > effects on those flags at all, but it certainly would not have set them
 > for pages it didn't even visit, which would be most.
 >
 > Net result is that the pg_class.relallvisible fractions didn't get high
 > enough to persuade the planner that index-only scans would be effective.
 > I guess you could call that a statistic, but it's really about the
 > contents of the tables' free space maps.
 
 >
 >             regards, tom lane

This is good to know.  I think we will be running VACUUM ANALYZE from
now on after restore instead of just ANALYZE.
 
I do note that sect. 49.11 claims that ANALYZE updates
pg_class.relallvisible.  I don't know if this is a documentation problem
in light of what you explained.

PJ

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Chante domain type - Postgres 9.2
Следующее
От: "dbyzaa@163.com"
Дата:
Сообщение: temporary table vs array performance