ANALYSE on top-level of partitioned tables - required?

Поиск
Список
Период
Сортировка
От Toby Corkindale
Тема ANALYSE on top-level of partitioned tables - required?
Дата
Msg-id 4F55980D.2080307@strategicdata.com.au
обсуждение исходный текст
Список pgsql-general
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

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

Предыдущее
От: Chris Travers
Дата:
Сообщение: Re: Lost data Folder, but have WAL files--- How to recover the database ?? Windows
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Lost data Folder, but have WAL files--- How to recover the database ?? Windows