Re: [SQL] Yet Another (Simple) Case of Index not used

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [SQL] Yet Another (Simple) Case of Index not used
Дата
Msg-id 27004.1050852329@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [SQL] Yet Another (Simple) Case of Index not used  (Andreas Pflug <Andreas.Pflug@web.de>)
Ответы Re: [SQL] Yet Another (Simple) Case of Index not used
Список pgsql-performance
Andreas Pflug <Andreas.Pflug@web.de> writes:
>  I think a row counter on each table would be even useful for some kind
> of auto-vacuum mechanism, that could be triggered if pg_class.reltuples
> deviates too far from the real row count.

It would be counting the wrong thing.  auto-vacuum needs to know how
many dead tuples are in a table, not how many live ones.  Example:
UPDATE doesn't change the live-tuple count (without this property,
I don't think the sort of count maintenance Kevin is proposing could
possibly be efficient enough to be interesting).  But it does create
a dead tuple that vacuum wants to know about.

            regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [SQL] Yet Another (Simple) Case of Index not used
Следующее
От: Andreas Pflug
Дата:
Сообщение: Re: [SQL] Yet Another (Simple) Case of Index not used