X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id B18C3D1B8DA; Tue, 27 Apr 2004 12:35:45 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 39708-10; Tue, 27 Apr 2004 12:35:43 -0300 (ADT) Received: from anchor-post-31.mail.demon.net (anchor-post-31.mail.demon.net [194.217.242.89]) by svr1.postgresql.org (Postfix) with ESMTP id BD5EFD1B8AA; Tue, 27 Apr 2004 12:35:42 -0300 (ADT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-31.mail.demon.net with esmtp (Exim 3.35 #1) id 1BIUcW-000N6f-0V; Tue, 27 Apr 2004 16:35:40 +0100 Received: from client17.archonet.com (client17.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 49B6C16229; Tue, 27 Apr 2004 16:35:39 +0100 (BST) From: Richard Huxton To: "Luiz Rafael Culik Guimaraes" , Subject: Re: [SQL] query optimizer dont treat correctly OR Date: Tue, 27 Apr 2004 16:35:39 +0100 User-Agent: KMail/1.5 Cc: References: <007101c42c66$c0bffb30$2b38fea9@luiz> In-Reply-To: <007101c42c66$c0bffb30$2b38fea9@luiz> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200404271635.39024.dev@archonet.com> X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200404/1039 X-Sequence-Number: 60281 On Tuesday 27 April 2004 15:48, Luiz Rafael Culik Guimaraes wrote: > Hello folks > > See the command bellow. I use some thing simmilar about an decade on > Oracle, > Sybase, MSSQL, DB2, etc. But with Postgresql , he generate an FULL TABLE > SCAN, > and consequenyly it take about 10 minutes to run (Very big table..) > Why Post do this wrong julgment with the initial command? > Exist some thing that i can configure to to make postgres works correctly ? You'll need to post the output of EXPLAIN ANALYSE for your query. This will show how many rows PG thinks it will get back compared to how many it actually gets back. -- Richard Huxton Archonet Ltd