Search Postgresql Archives

Re: Creating big indexes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jun 9, 2024 at 10:39 AM Lok P <loknath.73@xxxxxxxxx> wrote:


On Sun, Jun 9, 2024 at 10:36 AM sud <suds1434@xxxxxxxxx> 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?
 

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux