Re: BUG #15987: Improve REINDEX of all indexes of a table at once

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #15987: Improve REINDEX of all indexes of a table at once
Дата
Msg-id 31841.1567352185@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #15987: Improve REINDEX of all indexes of a table at once  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список pgsql-bugs
Fabien COELHO <coelho@cri.ensmp.fr> writes:
>> I don't quite understand your request.  You have REINDEX TABLE which
>> is able to reindex all the indexes of a table one by one, […]

> I understood the request as the scan should be factored out, so that 
> reindexing a table with multiple indexes would cost only one seq scan.

I'm not totally convinced that that would be an improvement.
For starters, one would presumably have to divide up maintenance_work_mem
per index, which would be a substantial penalty for some index types.
Also, you'd be creating more randomized I/O on the index-writing side
of the equation (for those index types that write the index during the
scan).

It might net out as a win anyway depending on context, but I don't
think it's as clear-cut as the OP seems to think.

            regards, tom lane



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

Предыдущее
От: Jo Tzschenscher
Дата:
Сообщение: Re: BUG #15987: Improve REINDEX of all indexes of a table at once
Следующее
От: easteregg@verfriemelt.org
Дата:
Сообщение: Re: BUG #15984: order of where in() query affects query planer