Received: from localhost (pluto.hub.org [200.46.204.4]) by postgresql.org (Postfix) with ESMTP id D1D0F9FA0B7 for ; Wed, 22 Nov 2006 12:59:55 -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 07139-09 for ; Wed, 22 Nov 2006 12:59:51 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.logix-tt.com (mail.logix-tt.com [212.211.145.186]) by postgresql.org (Postfix) with ESMTP id CB04B9FA4C8 for ; Wed, 22 Nov 2006 12:59:51 -0400 (AST) Received: from kingfisher.intern.logix-tt.com (p549D17F7.dip0.t-ipconnect.de [84.157.23.247]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.logix-tt.com (Postfix) with ESMTP id 41BF764BDC for ; Wed, 22 Nov 2006 18:02:34 +0100 (CET) Received: from [127.0.0.1] (localhost [127.0.0.1]) by kingfisher.intern.logix-tt.com (Postfix) with ESMTP id A2CD7186623A4 for ; Wed, 22 Nov 2006 17:59:46 +0100 (CET) Message-ID: <45648202.3050109@logix-tt.com> Date: Wed, 22 Nov 2006 17:59:46 +0100 From: Markus Schaber Organization: Logical Tracking and Tracing International AG, Switzerland User-Agent: Thunderbird 1.5.0.7 (X11/20060927) MIME-Version: 1.0 To: PostgreSQL Performance List Subject: Re: PostgreSQL underestimates sorting References: <456423B3.7010505@logix-tt.com> <20061122135434.GA9669@uio.no> <45645E7C.4030101@logix-tt.com> <20061122105341.79874069.frank@wiles.org> In-Reply-To: <20061122105341.79874069.frank@wiles.org> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/188 X-Sequence-Number: 21958 Hi, Frank, Frank Wiles wrote: >> The temporary data is not swapping, it's the Postgres on-disk sort >> algorithm. > > Are you actually running a query where you have a GB of data > you need to sort? If not I fear you may be causing the system > to swap by setting it this high. Yes, the table itself is about 40 Gigs in size, thus much larger than the memory. The machine has 16 Gigs of ram, and 10-12 Gigs are available for PostgreSQL + Disk Cache. There's no swapping, only 23 MB of swap are used (40 Gigs are available). That's one example configuration, there are others on different machines where it turns out that forcing index usage leads to faster queries, and less overall ressource consumption. (Or, at least, faster delivery of the first part of the result so the application can begin to process it asynchroneously). Thanks, Markus -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in Europe! www.ffii.org www.nosoftwarepatents.org