public inbox for [email protected]
help / color / mirror / Atom feedFrom: Lok P <[email protected]>
To: sud <[email protected]>
Cc: pgsql-general <[email protected]>
Subject: Re: Creating big indexes
Date: Sun, 9 Jun 2024 13:39:56 +0530
Message-ID: <CAKna9VZXweP1os0YnhYMcvyKHP6NQS7rCCkW-H==KVK=E0ZHPw@mail.gmail.com> (raw)
In-Reply-To: <CAKna9VYFnmcj0m4FtfMsEQbW8-5QSg8=najLbs-DBHMwtDR=DQ@mail.gmail.com>
References: <CAKna9VaOt_FPSSdMQaF0abiAPLdN1jB9renORV+ky2mP1_nDRw@mail.gmail.com>
<CAD=mzVXtgnFxk0uE6=yaJX8JYY6kt4UiUc-kqi=MyUOCmWp3hg@mail.gmail.com>
<CAKna9VYFnmcj0m4FtfMsEQbW8-5QSg8=najLbs-DBHMwtDR=DQ@mail.gmail.com>
On Sun, Jun 9, 2024 at 10:39 AM Lok P <[email protected]> wrote:
>
>
> On Sun, Jun 9, 2024 at 10:36 AM sud <[email protected]> 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?
>
Additionally ,is it also possible to drop the indexes also from the big
partition table efficiently? To avoid the "transaction id wrap around" or
"table bloat" when the index drop runs for longer duration?
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Creating big indexes
In-Reply-To: <CAKna9VZXweP1os0YnhYMcvyKHP6NQS7rCCkW-H==KVK=E0ZHPw@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox