X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 31BA7D1D94C for ; Fri, 29 Aug 2003 08:10:17 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 99592-10 for ; Fri, 29 Aug 2003 05:10:08 -0300 (ADT) Received: from mail.speakeasy.net (mail15.speakeasy.net [216.254.0.215]) by svr1.postgresql.org (Postfix) with ESMTP id 8CBF0D1B9AE for ; Fri, 29 Aug 2003 05:10:05 -0300 (ADT) Received: (qmail 11115 invoked from network); 29 Aug 2003 08:10:06 -0000 Received: from unknown (HELO speakeasy.org) (kgeis@[66.93.130.165]) (envelope-sender ) by mail15.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 29 Aug 2003 08:10:06 -0000 Message-ID: <3F4F0A5E.8030207@speakeasy.org> Date: Fri, 29 Aug 2003 01:10:06 -0700 From: Ken Geis User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030612 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Bruno Wolff III Cc: pgsql-performance@postgresql.org Subject: Re: bad estimates References: <3F4E99F7.7080604@speakeasy.org> <20030829025109.GD4373@wolff.to> <3F4EBF7E.8020602@speakeasy.org> <20030829030156.GF4373@wolff.to> <3F4EC1D0.5010503@speakeasy.org> <20030829033818.GA5577@wolff.to> <3F4ECC78.7090502@speakeasy.org> <20030829040519.GA5746@wolff.to> <3F4ED1DC.50808@speakeasy.org> <20030829042453.GA5931@wolff.to> <3F4F0777.8090503@speakeasy.org> In-Reply-To: <3F4F0777.8090503@speakeasy.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/478 X-Sequence-Number: 3294 Ken Geis wrote: > I went through the code (7.4 beta2) that estimates the cost of an index > scan path. What I need to be sure of is that when running a query in > pgsql that uses only the columns that are in an index, the underlying > table need not be accessed. I know that Oracle does this. Thinking about it some more, it's obvious to me that a pgsql index scan must be accessing the underlying table even though all of the information needed is in the index itself. A linear scan of a 660M file should not take 55 minutes. I could confirm this with stats, but someone out there probably already knows the answer here. Ken