X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 2CA779DC84B for ; Tue, 21 Mar 2006 14:16:58 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 31483-04 for ; Tue, 21 Mar 2006 14:16:56 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from cassarossa.samfundet.no (cassarossa.samfundet.no [129.241.93.19]) by postgresql.org (Postfix) with ESMTP id 58EB59DC831 for ; Tue, 21 Mar 2006 14:16:55 -0400 (AST) Received: from trofast.ipv6.sesse.net ([2001:700:300:dc03:20e:cff:fe36:a766] helo=trofast.sesse.net) by cassarossa.samfundet.no with esmtp (Exim 4.50) id 1FLlPa-0005uJ-5n; Tue, 21 Mar 2006 19:16:54 +0100 Received: from sesse by trofast.sesse.net with local (Exim 3.36 #1 (Debian)) id 1FLlQC-0004Gl-00; Tue, 21 Mar 2006 19:17:32 +0100 Date: Tue, 21 Mar 2006 19:17:32 +0100 From: "Steinar H. Gunderson" To: Fernando Lujan Cc: pgsql-performance@postgresql.org Subject: Re: Sequence Scan vs. Index scan Message-ID: <20060321181732.GA16124@uio.no> Mail-Followup-To: Fernando Lujan , pgsql-performance@postgresql.org References: <44204107.3040708@mandic.com.br> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <44204107.3040708@mandic.com.br> X-Operating-System: Linux 2.6.14.3 on a x86_64 X-Message-Flag: Outlook? --> http://www.mozilla.org/products/thunderbird/ User-Agent: Mutt/1.5.11+cvs20060126 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.088 required=5 tests=[AWL=0.088] X-Spam-Score: 0.088 X-Spam-Level: X-Archive-Number: 200603/417 X-Sequence-Number: 17854 On Tue, Mar 21, 2006 at 03:08:07PM -0300, Fernando Lujan wrote: > I'm trying to figure out when Sequence Scan is better than Index Scan. I > just want to know this because I disabled the sequence scan in > postgresql and receive a better result. :) That is a very broad question, and you're introducing somewhat of a false choice since you're talking about joins (a join can be solved by more methods than just "sequential scan" or not). Could you please paste the exact query you're using, with EXPLAIN ANALYZE for both the case with and without sequential scans? /* Steinar */ -- Homepage: http://www.sesse.net/