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 1175C9DCB32 for ; Tue, 21 Mar 2006 14:10:52 -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 30218-04 for ; Tue, 21 Mar 2006 14:10:51 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from smtp-01.mandic.com.br (smtp-01.mandic.com.br [200.225.81.132]) by postgresql.org (Postfix) with ESMTP id BF2159DCB10 for ; Tue, 21 Mar 2006 14:10:49 -0400 (AST) Received: (qmail 9253 invoked from network); 21 Mar 2006 18:10:47 -0000 Received: from internet.nube.com.br (HELO [192.168.1.59]) (0Mnb0cjHxdaV1Nm4xtaioaaCll6Wp6IuYnI=@[200.190.102.100]) (envelope-sender ) by smtp-01.mandic.com.br (qmail-ldap-1.03) with SMTP for ; 21 Mar 2006 18:10:47 -0000 Message-ID: <44204107.3040708@mandic.com.br> Date: Tue, 21 Mar 2006 15:08:07 -0300 From: Fernando Lujan User-Agent: Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Sequence Scan vs. Index scan Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200603/416 X-Sequence-Number: 17853 Hi guys, 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. :) Two tables. Table 1 (1 million rows ) ----------- id text table2_id Table 2 (300 thousand rows) ---------- id text 2 When I join these two tables I have a sequence_scan. :( Thanks in advance. Fernando Lujan