Re: ANALYZE'ing table hierarchies - Mailing list pgsql-admin

From Tom Lane
Subject Re: ANALYZE'ing table hierarchies
Date
Msg-id 12848.1455890483@sss.pgh.pa.us
Whole thread Raw
In response to Re: ANALYZE'ing table hierarchies  (nunks <nunks.lol@gmail.com>)
List pgsql-admin
nunks <nunks.lol@gmail.com> writes:
> I deal with some big (TB-level) partitioned tables where the application
> does a hybrid of querying both the master and the child tables directly.
> This clarification will be very useful.

BTW, the autovacuum daemon is normally fairly good about analyzing
tables when the individual-table stats need updating (or if you think
it isn't, you can adjust its parameters to make it more or less
aggressive about that).  Where it falls down is actually in maintenance
of whole-tree stats: it does not realize that a bunch of updates on a
child table should prompt auto-analyze of the parent table as well as
the child.  So I'd actually not think that you need to worry too much
about manual ANALYZEs of the children.  You might indeed need to help
things out with periodic manual ANALYZEs of the parent table, though.

            regards, tom lane


pgsql-admin by date:

Previous
From: Fujii Masao
Date:
Subject: Re: 9.5 new setting "cluster name" and logging
Next
From: Evan Rempel
Date:
Subject: Re: 9.5 new setting "cluster name" and logging