Re: build multiple indexes in single table pass?

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Aidan Van Dyk <aidan(at)highrise(dot)ca>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: build multiple indexes in single table pass?
Date: 2008-04-01 13:59:35
Message-ID: 47F23FC7.2060100@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Aidan Van Dyk wrote:
> * Andrew Dunstan <andrew(at)dunslane(dot)net> [080401 08:22]:
>
>> From the "idle thoughts in the middle of the night" department:
>>
>> 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? If so, that would probably
>> give us a potential performance improvement in pg_restore quite apart
>> from the projected improvement to be got from running several steps in
>> parallel processes. The grammar might look a bit ugly, but I'm sure we
>> could finesse that.
>>
>
> 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)?
>
>
>

Good question. Might it also help in that case to have pg_dump output
indexes in a given schema sorted by <tablename, indexname> rather than
just <indexname>?

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-04-01 14:06:01 Re: [HACKERS] How embarrassing: optimization of a one-shot query doesn't work
Previous Message Mike Aubury 2008-04-01 13:39:19 Scroll cursor oddity...