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 6F0AB32A3C1 for ; Tue, 12 Oct 2004 02:13:42 +0100 (BST) 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 33170-09 for ; Tue, 12 Oct 2004 01:13:37 +0000 (GMT) Received: from stark.xeocode.com (gsstark.mtl.istop.com [66.11.160.162]) by svr1.postgresql.org (Postfix) with ESMTP id E34AD32A2AE for ; Tue, 12 Oct 2004 02:13:38 +0100 (BST) Received: from localhost ([127.0.0.1] helo=stark.xeocode.com) by stark.xeocode.com with smtp (Exim 3.36 #1 (Debian)) id 1CHBEF-0004T2-00; Mon, 11 Oct 2004 21:13:27 -0400 To: John Meinel Cc: Francisco Reyes , pgsql-performance@postgresql.org Subject: Re: why my query is not using index?? References: <41639F3C.4050103@siche.net> <200410111425.02671.vygen@gmx.de> <20041011163756.M97379@zoraida.natserv.net> <416B217D.9090000@johnmeinel.com> In-Reply-To: <416B217D.9090000@johnmeinel.com> From: Greg Stark Organization: The Emacs Conspiracy; member since 1992 Date: 11 Oct 2004 21:13:27 -0400 Message-ID: <87fz4k3fig.fsf@stark.xeocode.com> Lines: 15 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/150 X-Sequence-Number: 8626 John Meinel writes: > As Janning mentioned, sometimes sequential scans *are* faster. If the number of > entries that will be found is large compared to the number of total entries (I > don't know the percentages, but probably >30-40%), Actually 30%-40% is unrealistic. The traditional rule of thumb for the break-even point was 10%. In POstgres the actual percentage varies based on how wide the records are and how correlated the location of the records is with the index. Usually it's between 5%-10% but it can be even lower than that sometimes. -- greg