Received: from localhost (pluto.hub.org [200.46.204.4]) by postgresql.org (Postfix) with ESMTP id 79BE69FB1CA for ; Wed, 22 Nov 2006 09:58:29 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.4]) (amavisd-new, port 10024) with ESMTP id 31051-03-3 for ; Wed, 22 Nov 2006 09:58:00 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from cassarossa.samfundet.no (cassarossa.samfundet.no [129.241.93.19]) by postgresql.org (Postfix) with ESMTP id 17EDA9FA66C for ; Wed, 22 Nov 2006 09:55:55 -0400 (AST) Received: from trofast.sesse.net ([129.241.93.32]) by cassarossa.samfundet.no with esmtp (Exim 4.50) id 1GmsZq-000223-RY; Wed, 22 Nov 2006 14:55:51 +0100 Received: from sesse by trofast.sesse.net with local (Exim 3.36 #1 (Debian)) id 1GmsYc-0002Wq-00; Wed, 22 Nov 2006 14:54:34 +0100 Date: Wed, 22 Nov 2006 14:54:34 +0100 From: "Steinar H. Gunderson" To: Markus Schaber Cc: PostgreSQL Performance List Subject: Re: PostgreSQL underestimates sorting Message-ID: <20061122135434.GA9669@uio.no> Mail-Followup-To: Markus Schaber , PostgreSQL Performance List References: <456423B3.7010505@logix-tt.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <456423B3.7010505@logix-tt.com> X-Operating-System: Linux 2.6.17.11 on a x86_64 X-Message-Flag: Outlook? --> http://www.mozilla.org/products/thunderbird/ User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/184 X-Sequence-Number: 21954 On Wed, Nov 22, 2006 at 11:17:23AM +0100, Markus Schaber wrote: > The Backend allocates gigs of memory (we've set sort_mem to 1 gig), and > then starts spilling out more Gigs of temporary data to the disk. How much RAM is in the server? Remember that sort_mem is _per sort_, so if you have multiple sorts, it might allocate several multiples of the amount you set up. /* Steinar */ -- Homepage: http://www.sesse.net/