Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id E287FB5DC4F for ; Sun, 11 Sep 2011 23:29:31 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 42906-05 for ; Mon, 12 Sep 2011 02:29:26 +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 DBC66B5DC07 for ; Sun, 11 Sep 2011 23:29:25 -0300 (ADT) Received: by tamriel.snowman.net (Postfix, from userid 1000) id 5914D229B6; Sun, 11 Sep 2011 22:29:26 -0400 (EDT) Date: Sun, 11 Sep 2011 22:29:26 -0400 From: Stephen Frost To: Claudio Freire Cc: Igor Chudov , pgsql-performance@postgresql.org Subject: Re: Postgres for a "data warehouse", 5-10 TB Message-ID: <20110912022926.GP12765@tamriel.snowman.net> References: <20110911230135.GN12765@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dUQzTuC3g77BtMOt" Content-Disposition: inline In-Reply-To: X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/2.6.32-5-amd64 (x86_64) X-Uptime: 22:28:12 up 221 days, 10:58, 11 users, load average: 0.00, 0.00, 0.00 User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201109/136 X-Sequence-Number: 44912 --dUQzTuC3g77BtMOt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Claudio Freire (klaussfreire@gmail.com) wrote: > I don't think you'd want that. Remember, work_mem is the amount of > memory *per sort*. > Queries can request several times that much memory, once per sort they > need to perform. >=20 > You can set it really high, but not 60% of your RAM - that wouldn't be wi= se. Oh, I dunno.. It's only used by the planner, so sometimes you have to bump it up, especially when PG thinks the number of rows returned from something will be a lot more than it really will be. :) /me has certain queries where it's been set to 100GB... ;) I agree that it shouldn't be the default, however. That's asking for trouble. Do it for the specific queries that need it. Thanks, Stephen --dUQzTuC3g77BtMOt Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAk5tboYACgkQrzgMPqB3kiifJQCePYGSDf70L6Tfqs6xuSFMJ1pk xzEAn0H3917ETcHM2dyIu7FvVjebpHd8 =fHmS -----END PGP SIGNATURE----- --dUQzTuC3g77BtMOt--