From: Tom Lane <tgl@sss.pgh.pa.us>
To: nunks <nunks.lol@gmail.com>
Cc: gaoqiangdba@163.com <gaoqiangdba@163.com>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: ANALYZE'ing table hierarchies
Date: Fri, 19 Feb 2016 08:32:46 -0500
Message-ID: <11677.1455888766@sss.pgh.pa.us> (raw)
In-Reply-To: <CACq6szQehp21577Qs57yRae5gtYgUXx0-TOQcDTohiro6--OVA@mail.gmail.com>
References: <CACq6szTXye=LzyFHnfYe-zZFZ-=TTG45uECs_o5_qOArfB=RZQ@mail.gmail.com>
<201602191441422069485@163.com>
<CACq6szQehp21577Qs57yRae5gtYgUXx0-TOQcDTohiro6--OVA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
nunks <nunks.lol@gmail.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
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, nunks.lol@gmail.com, gaoqiangdba@163.com
Subject: Re: ANALYZE'ing table hierarchies
In-Reply-To: <11677.1455888766@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox