Received: from comet.pacifier.com ([199.2.117.155]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0BH1gB54493 for ; Fri, 11 Jan 2002 12:01:43 -0500 (EST) (envelope-from dhogaza@pacifier.com) Received: from pacifier.com (dsl-dhogaza.pacifier.net [207.202.226.68]) by comet.pacifier.com (8.11.2/8.11.1) with ESMTP id g0BH12X28141 for ; Fri, 11 Jan 2002 09:01:02 -0800 (PST) Message-ID: <3C3F1A7A.7020404@pacifier.com> Date: Fri, 11 Jan 2002 09:01:46 -0800 From: Don Baccus User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221 X-Accept-Language: en-us MIME-Version: 1.0 CC: pgsql-hackers@postgresql.org Subject: Re: again on index usage References: <200201111642.g0BGghR14522@candle.pha.pa.us> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Archive-Number: 200201/477 X-Sequence-Number: 17503 Bruce Momjian wrote: >>Oracle partially mitigates the second effect by refusing to trash its >>entire buffer cache on any given sequential scan. Or so I've been told >>by people who know Oracle well. A repeat of the sequential scan will >>still have to reread the entire table but that's true anyway if the >>table's at least one block longer than available cache. >> > > That is on our TODO list, at least. I didn't realize this, it's good news. (I don't follow PG development closely these days). BTW overall I think the cost-estimating portion of the PG optimizer does about as well as Oracle's. Oracle is a lot smarter about doing transformations of certain types of queries (turning "scalar in (select ...)" into something akin to an "exists") but of course this has nothing to do with estimating the cost of index vs. sequential scans. -- Don Baccus Portland, OR http://donb.photo.net, http://birdnotes.net, http://openacs.org