Skip site navigation (1) Skip section navigation (2)

Building multiple indexes concurrently

From: Rob Wultsch <wultsch(at)gmail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Building multiple indexes concurrently
Date: 2010-03-17 01:04:41
Message-ID: 2c5ef4e31003161804l5e32ceb9v6b7019118f30004d@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-performance
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(at)gmail(dot)com

Responses

pgsql-performance by date

Next:From: Ben ChobotDate: 2010-03-17 05:13:27
Subject: Re: Building multiple indexes concurrently
Previous:From: Alvaro HerreraDate: 2010-03-17 00:14:05
Subject: Re: Block at a time ...

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group