Search Postgresql Archives

ANALYSE on top-level of partitioned tables - required?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
Say you have a master table which has many partitioned tables, created like this:

CREATE TABLE foo (various columns...);
CREATE TABLE foo_1 () INHERITS foo;
CREATE TABLE foo_2 () INHERITS foo;

Now lets say you insert data directly into foo_X, eg with
COPY foo_1 FROM...
COPY foo_1 FROM...

Do you need to manually call ANALYZE manually on foo for PostgreSQL to build statistics on it?

I remember seeing something in the documentation about how the auto-analyser won't realise it needs to run on top-level tables because as far as its concerned, there have been no changes to it..

But, I wondered if that matters? I mean, since there's no data in it, but all the child tables are analysed, is that enough?


My experience so far indicates that it DOES matter (looking at query plans before and after calling ANALYSE), but I'd like to get some opinions from those more knowledgeable than I..

thanks in advance,
Toby

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux