From: Rob Wultsch <wultsch@gmail.com>
To: pgsql-performance@postgresql.org
Subject: Building multiple indexes concurrently
Date: Tue, 16 Mar 2010 18:04:41 -0700
Message-ID: <2c5ef4e31003161804l5e32ceb9v6b7019118f30004d@mail.gmail.com> (raw)
Lets say I have a large table bigTable to which I would like to add
two btree indexes. Is there a more efficient way to create indexes
than:
CREATE INDEX idx_foo on bigTable (foo);
CREATE INDEX idx_baz on bigTable (baz);
Or
CREATE INDEX CONCURRENTLY idx_foo on bigTable (foo);
CREATE INDEX CONCURRENTLY idx_baz on bigTable (baz);
Are there any particular performance optimizations that would be in
play in such a scenario?
At a minimum I assume that if both of the commands were started at
about the same time they would each scan the table in the same
direction and whichever creation was slower would benefit from most of
the table data it needed being prepopulated in shared buffers. Is this
the case?
--
Rob Wultsch
wultsch@gmail.com
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: pgsql-performance@postgresql.org
Cc: wultsch@gmail.com
Subject: Re: Building multiple indexes concurrently
In-Reply-To: <2c5ef4e31003161804l5e32ceb9v6b7019118f30004d@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox