Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 854021337B34 for ; Thu, 11 Nov 2010 09:58:09 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 20242-03 for ; Thu, 11 Nov 2010 13:58:04 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mh5.mail.rice.edu (mh5.mail.rice.edu [128.42.199.32]) by mail.postgresql.org (Postfix) with ESMTP id 306341337B82 for ; Thu, 11 Nov 2010 09:58:02 -0400 (AST) Received: from mh5.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh5.mail.rice.edu (Postfix) with ESMTP id 6D38A28F76A; Thu, 11 Nov 2010 07:58:02 -0600 (CST) X-Virus-Scanned: by amavis-2.6.4 at mh5.mail.rice.edu, auth channel Received: from mh5.mail.rice.edu ([127.0.0.1]) by mh5.mail.rice.edu (mh5.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id JAEiWUtU4M6t; Thu, 11 Nov 2010 07:58:02 -0600 (CST) X-SMTP-Auth: no X-SMTP-Auth: no Received: from aart.is.rice.edu (aart.is.rice.edu [168.7.56.48]) by mh5.mail.rice.edu (Postfix) with ESMTP id 3CC2E28F75B; Thu, 11 Nov 2010 07:58:02 -0600 (CST) Received: by aart.is.rice.edu (Postfix, from userid 18612) id 8C9F72D5A6; Thu, 11 Nov 2010 07:58:01 -0600 (CST) Date: Thu, 11 Nov 2010 07:58:00 -0600 From: Kenneth Marshall To: Marc Mamin Cc: pgsql-performance@postgresql.org Subject: Re: CREATE INDEX as bottleneck Message-ID: <20101111135800.GC14016@aart.is.rice.edu> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.16 (2007-06-09) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.21 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201011/147 X-Sequence-Number: 41171 On Thu, Nov 11, 2010 at 02:41:12PM +0100, Marc Mamin wrote: > Hello, > > in the last years, we have successfully manage to cope with our data > growth > using partitioning and splitting large aggregation tasks on multiple > threads. > The partitioning is done logically by our applicationn server, thus > avoiding trigger overhead. > > There are a few places in our data flow where we have to wait for index > creation before being able to distribute the process on multiple threads > again. > > With the expected growth, create index will probably become a severe > bottleneck for us. > > Is there any chance to see major improvement on it in a middle future ? > I guess the question is naive, but why can't posgres use multiple > threads for large sort operation ? > > > best regards, > > Marc Mamin > There has been a recent discussion on the hackers mailing list on using the infrastructure that is already in place to lauch autovacuum processes to launch other helper processes. Something like this could be used to offload the sort process to a much more parallelize version that could take advantage of multiple I/O streams and CPU cores. Many things are possible given the appropriate resources: funding, coding and development cycles... Regards, Ken