Re: when to reindex?

Поиск
Список
Период
Сортировка
От Gurjeet Singh
Тема Re: when to reindex?
Дата
Msg-id 65937bea0806080105x266154f7h23880700b7b8b509@mail.gmail.com
обсуждение исходный текст
Ответ на Re: when to reindex?  (Jeremy Harris <jgh@wizmail.org>)
Список pgsql-general
On Sat, Jun 7, 2008 at 8:07 PM, Jeremy Harris <jgh@wizmail.org> wrote:
Gregory Stark wrote:
 REINDEX scans the table
precisely once and sorts it.

For the bloat, as opposed to corruption, case -
what information is needed from the table that
is not in the old index?  Why would a sequential
read of the old index alone (then some processing)
not suffice?

In Postgres, an index does not hold the livliness information of the rows it is pointing it; that is, there may be a thousand row-pointers in the index, but not all the rows pointed to by those pointers are known to be live. This is an implication of MVCC in Postgres.

So every index lookup has to look at the corresponding heap (aka table) row and decide if that row should be visible to the querying session.

Best regards,

--
gurjeet[.singh]@EnterpriseDB.com
singh.gurjeet@{ gmail | hotmail | indiatimes | yahoo }.com

EnterpriseDB http://www.enterprisedb.com

Mail sent from my BlackLaptop device

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

Предыдущее
От: "Scott Marlowe"
Дата:
Сообщение: Re: temporarily deactivate an index
Следующее
От: Oliver Kohll
Дата:
Сообщение: libpq.so.4