Re: Creating big indexes

Поиск
Список
Период
Сортировка
Искать
От
Lok P
Тема
Re: Creating big indexes
Дата
Msg-id
CAKna9VYFnmcj0m4FtfMsEQbW8-5QSg8=najLbs-DBHMwtDR=DQ@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Creating big indexes Lok P <loknath.73@gmail.com>
Re: Creating big indexes sud <suds1434@gmail.com>
Re: Creating big indexes Lok P <loknath.73@gmail.com>
Re: Creating big indexes Lok P <loknath.73@gmail.com>
Re: Creating big indexes sud <suds1434@gmail.com>


On Sun, Jun 9, 2024 at 10:36 AM sud <suds1434@gmail.com> wrote:

 You can first create the index on the table using the "On ONLY"keyword, something as below.

CREATE INDEX idx ON ONLY tab(col1);

Then create indexes on each partition in "concurrently" from multiple sessions in chunks.

CREATE INDEX CONCURRENTLY idx_1    ON tab_part1(col1);
CREATE INDEX CONCURRENTLY idx_2    ON tab_part2(col1);

After this step finishes the table level index which was created in the first step will be in valid state automatically.


Thank you so much.
Should we also tweak the parameters related to the parallelism and memory as I mentioned in the first post? 
В списке pgsql-general по дате отправления
От: sud
Дата:
Сообщение: Re: Creating big indexes
От: sud
Дата:
Сообщение: Re: Question on pg_cron
FAQ