Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id B0819633195 for ; Wed, 2 Jun 2010 08:59:25 -0300 (ADT) 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 56296-02 for ; Wed, 2 Jun 2010 11:59:18 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from tamriel.snowman.net (tamriel.snowman.net [72.66.115.51]) by mail.postgresql.org (Postfix) with ESMTP id 262AD632BCA for ; Wed, 2 Jun 2010 08:59:18 -0300 (ADT) Received: by tamriel.snowman.net (Postfix, from userid 1000) id E242322282; Wed, 2 Jun 2010 07:59:16 -0400 (EDT) Date: Wed, 2 Jun 2010 07:59:16 -0400 From: Stephen Frost To: Mozzi Cc: Matthew Wakeling , pgsql-performance@postgresql.org Subject: Re: Overusing 1 CPU Message-ID: <20100602115916.GE21875@tamriel.snowman.net> References: <1275477160.1818.48.camel@stefaans-laptop> <1275478657.1818.53.camel@stefaans-laptop> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7KrrW+Tu6TqlrH/2" Content-Disposition: inline In-Reply-To: <1275478657.1818.53.camel@stefaans-laptop> X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/2.6.26-1-amd64 (x86_64) X-Uptime: 07:57:12 up 278 days, 23:22, 26 users, load average: 0.08, 0.12, 0.09 User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.51 tagged_above=-10 required=5 tests=BAYES_05=-0.5, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201006/23 X-Sequence-Number: 38879 --7KrrW+Tu6TqlrH/2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Mozzi, * Mozzi (mozzi.glug@gmail.com) wrote: > Thanx mate Create Index seems to be the culprit. > Is it normal to just use 1 cpu tho? Yes, PG can only use 1 CPU for a given query or connection. You'll start to see the other CPUs going when you have more than one connection to the database. If you're building alot of indexes then you probably want to split up the statements into multiple connections and run them in parallel. Thanks, Stephen --7KrrW+Tu6TqlrH/2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkwGR5QACgkQrzgMPqB3kihTxQCfQWmhDQzmFT1FjOV/8llUYxcv gyAAoIDZsV0j6fpjdT2ZnwscOo4D3Hud =d4ry -----END PGP SIGNATURE----- --7KrrW+Tu6TqlrH/2--