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 A31348BA0CA for ; Mon, 14 Feb 2005 03:41:48 +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 80244-08 for ; Mon, 14 Feb 2005 03:41:45 +0000 (GMT) Received: from mail.coretech.co.nz (coretech.co.nz [202.36.204.41]) by svr1.postgresql.org (Postfix) with ESMTP id 53A078BA0A0 for ; Mon, 14 Feb 2005 03:41:43 +0000 (GMT) Received: (qmail 17754 invoked from network); 14 Feb 2005 03:41:40 -0000 Received: from 218-101-14-48.paradise.net.nz (HELO ?192.168.1.11?) (218.101.14.48) by 0 with SMTP; 14 Feb 2005 03:41:41 -0000 Message-ID: <42101EF6.8010403@coretech.co.nz> Date: Mon, 14 Feb 2005 16:45:58 +1300 From: Mark Kirkwood User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20041016 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jaime Casanova Cc: performance pgsql Subject: Re: estimated rows vs. actual rows References: <200502131341.09811.josh@agliodbs.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.011 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200502/204 X-Sequence-Number: 10533 Jaime Casanova wrote: > > 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? > Depends on how those 2610 rows are distributed amongst the 143902. The worst case scenario is each one of them in its own page. In that case you have to read 2610 *pages*, which is probably a significant percentage of the table. You can find out this information from the pg_stats view (particularly the correlation column). Mark