X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5B26B534EF for ; Wed, 20 Apr 2005 00:01:45 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 88248-07 for ; Wed, 20 Apr 2005 03:01:35 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 155265337F for ; Wed, 20 Apr 2005 00:01:34 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j3K31Q3I019632; Tue, 19 Apr 2005 23:01:26 -0400 (EDT) To: "Jim C. Nasby" Cc: Dave Held , pgsql-performance@postgresql.org Subject: Re: Sort and index In-reply-to: <20050420004234.GX58835@decibel.org> References: <49E94D0CFCD4DB43AFBA928DDD20C8F9026184B6@asg002.asg.local> <20050420004234.GX58835@decibel.org> Comments: In-reply-to "Jim C. Nasby" message dated "Tue, 19 Apr 2005 19:42:34 -0500" Date: Tue, 19 Apr 2005 23:01:26 -0400 Message-ID: <19631.1113966086@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/481 X-Sequence-Number: 11878 "Jim C. Nasby" writes: > Actually, the planner (at least in 7.4) isn't smart enough to consider > if the sort would fit in memory or not. Really? Have you read cost_sort()? It's certainly possible that the calculation is all wet, but to claim that the issue is not considered is just wrong. regards, tom lane