Re: [HACKERS] mat views stats

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: [HACKERS] mat views stats
Дата
Msg-id 09a552a0-9bd7-ee5a-1597-b6c20023a172@2ndquadrant.com
обсуждение исходный текст
Ответ на [HACKERS] mat views stats  (Jim Mlodgenski <jimmy76@gmail.com>)
Ответы Re: [HACKERS] mat views stats  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Список pgsql-hackers
On 2/20/17 10:06, Jim Mlodgenski wrote:
> I've come across a number of times where the statistics on materialized
> views become stale producing bad plans. It turns out that autovacuum
> only touches a materialized view when it is first created and ignores it
> on a refresh. When you have a materialized view like yesterdays_sales
> the data in the materialized view turns over every day. 

That sounds like a bug.

> Attached is a patch to trigger autovacuum based on a matview refresh
> along with a system view pg_stat_all_matviews to show information more
> meaningful for materialized views.

It might be easier to include materialized views into pg_stat_*_tables.

I think these should be two separate patches.  We might want to
backpatch the first one.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] "may be unused" warnings for gcc
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] Change in "policy" on dump ordering?