Re: ANALYZE'ing table hierarchies

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: nunks <nunks(dot)lol(at)gmail(dot)com>
Cc: "gaoqiangdba(at)163(dot)com" <gaoqiangdba(at)163(dot)com>, pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: ANALYZE'ing table hierarchies
Date: 2016-02-19 13:32:46
Message-ID: 11677.1455888766@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

nunks <nunks(dot)lol(at)gmail(dot)com> writes:
> What eludes me is that part of the documentation says we should analyze
> each table individually, and another part says we can count on ANALYZE to
> work on the entire inheritance tree...

Whole-tree stats are a different thing from per-table stats. What
ANALYZE on a parent table produces is (1) stats for that table alone
and (2) summary stats for the whole inheritance tree rooted at that table.
If you want (3) stats for a child table alone then you need to ANALYZE
that child table by name.

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message nunks 2016-02-19 13:51:53 Re: ANALYZE'ing table hierarchies
Previous Message nunks 2016-02-19 11:48:36 Re: ANALYZE'ing table hierarchies