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 6D26D8BA0A2 for ; Mon, 14 Feb 2005 03:18:58 +0000 (GMT) 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 77597-07 for ; Mon, 14 Feb 2005 03:18:53 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.201]) by svr1.postgresql.org (Postfix) with ESMTP id 5EF778BA0A0 for ; Mon, 14 Feb 2005 03:18:52 +0000 (GMT) Received: by rproxy.gmail.com with SMTP id j1so569539rnf for ; Sun, 13 Feb 2005 19:18:53 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=tjs/Sfval/HpEKHOuILDLrzTcEIJjqEelsKhy0ECW86EWyp5OXJoilLdqrjr/qolrSZw4LQuqbUfZm3LCixL0VUKUY2UtxPqutYWQBg8uxhZzwMC3y9Sqihd7KZidtbXot+K6lFdeOeJ/c3xsZrWYP5zNtHb97MuThOtA1sRrbg= Received: by 10.38.97.1 with SMTP id u1mr191330rnb; Sun, 13 Feb 2005 19:18:52 -0800 (PST) Received: by 10.38.97.31 with HTTP; Sun, 13 Feb 2005 19:18:52 -0800 (PST) Message-ID: Date: Sun, 13 Feb 2005 22:18:52 -0500 From: Jaime Casanova Reply-To: Jaime Casanova To: Josh Berkus Subject: Re: estimated rows vs. actual rows Cc: performance pgsql In-Reply-To: <200502131341.09811.josh@agliodbs.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <200502131341.09811.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.122 tagged_above=0 required=5 tests=AWL, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200502/202 X-Sequence-Number: 10531 On Sun, 13 Feb 2005 13:41:09 -0800, Josh Berkus wrote: > Jaime, > > > Why is this query using a seq scan rather than a index scan? > > Because it thinks a seq scan will be faster. > I will suggest him to probe with seq scans disabled. But, IMHO, if the table has 143902 and it thinks will retrieve 2610 (almost 1.81% of the total). it won't be faster with an index? i know, i will suggest him to probe to be sure. just an opinion. regards, Jaime Casanova