Re: Creating big indexes

From: Lok P <loknath(dot)73(at)gmail(dot)com>
To: sud <suds1434(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Creating big indexes
Date: 2024-06-09 05:09:01
Message-ID: CAKna9VYFnmcj0m4FtfMsEQbW8-5QSg8=najLbs-DBHMwtDR=DQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Jun 9, 2024 at 10:36 AM sud <suds1434(at)gmail(dot)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?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message sud 2024-06-09 06:27:11 Re: Question on pg_cron
Previous Message sud 2024-06-09 05:06:02 Re: Creating big indexes