Re: VACUUM ANALYZE

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: VACUUM ANALYZE
Дата
Msg-id 19596.1011046270@sss.pgh.pa.us
обсуждение исходный текст
Ответ на VACUUM ANALYZE  (David Anthony <DavidA@tradeworld.net>)
Список pgsql-novice
David Anthony <DavidA@tradeworld.net> writes:
> Any other things I should look at?

Are your queries actually using the indexes?  See EXPLAIN.

> Also, is there a way to check when the
> last time VACUUM ANALYZE was run on the db. I am unsure whether the perl
> script is running the command successfully.

Look to see if there's up-to-date info in pg_statistic for the table,
eg with

select attname,attdispersion,s.*
from pg_statistic s, pg_attribute a, pg_class c
where starelid = c.oid and attrelid = c.oid and staattnum = attnum
and relname = 'WHATEVER';

This isn't timestamped in any way, but you could try doing a manual
"delete from pg_statistic" and then see if your script repopulates it.

            regards, tom lane

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

Предыдущее
От: "Travis Hoyt"
Дата:
Сообщение: Re: VACUUM ANALYZE
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Error compiling on SCO