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 5138252B71 for ; Sun, 14 Aug 2005 22:18:47 -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 24135-01 for ; Mon, 15 Aug 2005 01:18:46 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 832AF52974 for ; Sun, 14 Aug 2005 22:18:44 -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 j7F1IjgU014406; Sun, 14 Aug 2005 21:18:45 -0400 (EDT) To: "Steinar H. Gunderson" Cc: pgsql-performance@postgresql.org Subject: Re: Performance pb vs SQLServer. In-reply-to: <20050815010159.GA27795@uio.no> References: <20050811131911.3175A1C0031B@mwinf0401.wanadoo.fr> <42FFE17A.6010208@arbash-meinel.com> <20050815010159.GA27795@uio.no> Comments: In-reply-to "Steinar H. Gunderson" message dated "Mon, 15 Aug 2005 03:01:59 +0200" Date: Sun, 14 Aug 2005 21:18:45 -0400 Message-ID: <14401.1124068725@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 required=5 tests=[AWL=0.006] X-Spam-Level: X-Archive-Number: 200508/152 X-Sequence-Number: 13899 "Steinar H. Gunderson" writes: > To me, it looks like he'll get 88 rows, not 3.2M. Surely we must be able to > do something better than a full sequential scan in this case? Not really. There's been some speculation about implementing index "skip search" --- once you've verified there's at least one visible row of a given index value, tell the index to skip to the next different value instead of handing back any of the remaining entries of the current value. But it'd be a lot of work and AFAICS not useful for very many kinds of queries besides this. regards, tom lane