X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 29CCBD1BAA6 for ; Tue, 24 Feb 2004 20:54:21 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 88242-06 for ; Tue, 24 Feb 2004 16:54:19 -0400 (AST) Received: from mail.codenet.net (mail.codenet.net [209.248.81.8]) by svr1.postgresql.org (Postfix) with ESMTP id B2C24D1BAA3 for ; Tue, 24 Feb 2004 16:54:16 -0400 (AST) Received: from elvis [68.232.114.7] by mail.codenet.net with ESMTP (SMTPD32-7.07) id A9F88A029A; Tue, 24 Feb 2004 13:54:16 -0700 Content-Type: text/plain; charset="iso-8859-1" From: "Ed L." To: Kevin Brown , Postgres Performance Subject: Re: Column correlation drifts, index ignored again Date: Tue, 24 Feb 2004 13:54:15 -0700 User-Agent: KMail/1.4.3 References: <23533.1077647386@sss.pgh.pa.us> <20040224201419.GD3090@filer> In-Reply-To: <20040224201419.GD3090@filer> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200402241354.15025.pgsql@bluepolka.net> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/288 X-Sequence-Number: 5812 On Tuesday February 24 2004 1:14, Kevin Brown wrote: > > One problem I've been running into is the merge join spilling to disk > because sort_mem isn't big enough. The problem isn't that this is > happening, it's that I think the planner is underestimating the impact > that doing this will have on the time the merge join takes. Does the > planner even account for the possibility that a sort or join will spill > to disk? Spilling to disk like that will suddenly cause sequential > reads to perform much more like random reads, unless the sequential > scans are performed in their entirety between sorts/merges. How do you know the merge join is spilling to disk? How are you identifyin= g=20 that? Just assuming from vmstat? iostat?