Re: vacuum / analyze parent tables on partitioned tables.

Поиск
Список
Период
Сортировка
От Bert
Тема Re: vacuum / analyze parent tables on partitioned tables.
Дата
Msg-id CAFCtE1mBkjB5V8mF39sDEJkZ3mfXYMAmvsroXdgXt-Go+PKzWA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: vacuum / analyze parent tables on partitioned tables.  (Albe Laurenz <laurenz.albe@wien.gv.at>)
Список pgsql-admin



> autovacuum is still enabled, but we want to avoid autovacuum to hit right in the day / when the etl is
> working. So that's why we want to shedule it by hand, before autovacuum starts.

I see.

> Is it a good idea to exclude those tables then? And run only vacuum / analyze on the child tables, an
> wait for autovacuum to analyze the parent tables if it ever would become necesarry..

Sure, you could do that.
Maybe somebody on the list would know if autovacuum/analyze on the parent table
will scan the children - I believe it does not.
You could also test it yourself.

Yours,
Laurenz Albe


On Wed, Jan 23, 2013 at 1:38 PM, Albe Laurenz <laurenz.albe@wien.gv.at> wrote:
Bert wrote:
> I wrote a script to make sure all tables are vacuumed and analyzed every evening. This works very
> well.

Autovacuum doesn't do the job for you?

That would save you from worries like the ones you have.

> Does anyone has an idea why in this case the vacuum/analyze takes almost as long on the parent table
> as on the biggest child table? (the other child tables are smaller than f_tranaction_1, and their
> vacuum/analyze time is much shorter).

ANALYZE on the parent table gathers statistics about the child
tables as well, so it scans them too.

You still need to ANALYZE and VACUUM the child tables though.

Yours,
Laurenz Albe



--
Bert Desmet
0477/305361

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

Предыдущее
От: Albe Laurenz
Дата:
Сообщение: Re: vacuum / analyze parent tables on partitioned tables.
Следующее
От: Rural Hunter
Дата:
Сообщение: Re: vacuum / analyze parent tables on partitioned tables.