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

Re: build multiple indexes in single table pass?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Aidan Van Dyk <aidan(at)highrise(dot)ca>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: build multiple indexes in single table pass?
Date: 2008-04-01 14:50:32
Message-ID: 2147.1207061432@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Aidan Van Dyk <aidan(at)highrise(dot)ca> writes:
> * Andrew Dunstan <andrew(at)dunslane(dot)net> [080401 08:22]:
>> I don't know if this has come up before exactly, but is it possible that 
>> we could get a performance gain from building multiple indexes from a 
>> single sequential pass over the base table?

> I've not looked at any of the code, but would the "synchronized scans"
> heap machinery help the multiple index creations walk the heap together,
> basically giving you this for free (as long as you start concurrent
> index creation)?

Yeah, that should Just Work AFAICS.  Note also that this approach would
let you put multiple CPUs to work on the problem, whereas anything
involving stuffing multiple index creations into a single command
won't.

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2008-04-01 14:52:41
Subject: Re: Scroll cursor oddity...
Previous:From: Simon RiggsDate: 2008-04-01 14:46:15
Subject: Re: [HACKERS] ANALYZE getting dead tuple counthopelessly wrong

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