pg_class.reltuples not reset by VACUUM?

Поиск
Список
Период
Сортировка
От Jeff Boes
Тема pg_class.reltuples not reset by VACUUM?
Дата
Msg-id b6v1p3$cp4$1@news.hub.org
обсуждение исходный текст
Ответы Re: pg_class.reltuples not reset by VACUUM?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-admin
I thought that VACUUM ANALYZE would always restore some sense of reality
to the internal statistics for a table.  However ...


# select count(*) from job_queue;

 count
-------
   834
(1 row)

# select reltuples from pg_class where relname = 'job_queue';

 reltuples
-----------
    206277
(1 row)

# vacuum analyze job_queue;

# select reltuples from pg_class where relname = 'job_queue';

 reltuples
-----------
    2062xx   (slightly larger number)
(1 row)


This is of concern to me mostly because:

# explain select * from job_queue;

NOTICE:  QUERY PLAN:

Seq Scan on job_queue  (cost=0.00..5989.77 rows=206277 width=95)

Obviously, the optimizer thinks that the table has 200k rows in it!


--
Jeff Boes                                      vox 616.226.9550 ext 24
Database Engineer                                     fax 616.349.9076
Nexcerpt, Inc.                                 http://www.nexcerpt.com
           ...Nexcerpt... Extend your Expertise


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Problems with C Language Functions after upgrade to 7.3.2
Следующее
От: Jeff Boes
Дата:
Сообщение: VACUUM slow on small table