Using multiple cores for index creation?

From: henk de wit <henk53602(at)hotmail(dot)com>
To: <pgsql-performance(at)postgresql(dot)org>
Subject: Using multiple cores for index creation?
Date: 2009-01-29 20:21:30
Message-ID: COL104-W37259F48A4C29A6F6068FF5C90@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


Hi,When I try to restore a database dump on PostgreSQL 8.3 that's approximately 130GB in size and takes about 1 hour, I noticed index creation makes up the bulk of that time. I'm using a very fast I/O subsystem (16 Mtron Pro 7535 SSDs using a dual 1.2Ghz IOP/4GB cache RAID controller), fast CPUs (2 quad core C2Q's at 2.6Ghz) and 32GB RAM. From monitoring the restore process, I learned that only 10 minutes is spend doing IO, while the rest of the time is spend on creating the indexes. Index creation seems to be completely CPU bound.The problem is that only 1 CPU core is used. My other 7 cores are just sitting there doing nothing. It seems to me that creating each index, especially for different tables, is something that can be done independently.Is there some way I can let PostgreSQL use multiple cores for creating the indexes?Thanks in advance
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Chris Browne 2009-01-29 20:56:47 Re: PG performance in high volume environment (many INSERTs and lots of aggregation reporting)
Previous Message Subbiah Stalin-XCGF84 2009-01-29 20:15:01 Sort performance