Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vi4PS-0002ce-DX for pgsql-bugs@arkaria.postgresql.org; Sun, 17 Nov 2013 15:37:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Vi4PR-0006hm-L3 for pgsql-bugs@arkaria.postgresql.org; Sun, 17 Nov 2013 15:37:13 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vi4PP-0006hd-80 for pgsql-bugs@postgresql.org; Sun, 17 Nov 2013 15:37:11 +0000 Received: from nm36.bullet.mail.ne1.yahoo.com ([98.138.229.29]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vi4PH-0003Af-4w for pgsql-bugs@postgresql.org; Sun, 17 Nov 2013 15:37:10 +0000 Received: from [127.0.0.1] by nm36.bullet.mail.ne1.yahoo.com with NNFMP; 17 Nov 2013 15:37:00 -0000 Received: from [98.138.100.115] by nm36.bullet.mail.ne1.yahoo.com with NNFMP; 17 Nov 2013 15:34:11 -0000 Received: from [98.139.212.151] by tm106.bullet.mail.ne1.yahoo.com with NNFMP; 17 Nov 2013 15:34:11 -0000 Received: from [98.139.212.241] by tm8.bullet.mail.bf1.yahoo.com with NNFMP; 17 Nov 2013 15:34:11 -0000 Received: from [127.0.0.1] by omp1050.mail.bf1.yahoo.com with NNFMP; 17 Nov 2013 15:34:11 -0000 X-Yahoo-Newman-Property: ymail-4 X-Yahoo-Newman-Id: 526793.11572.bm@omp1050.mail.bf1.yahoo.com Received: (qmail 26825 invoked by uid 60001); 17 Nov 2013 15:34:11 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ymail.com; s=s1024; t=1384702451; bh=Kaiy49esHNXXajSG/ClS9WJcCWFHalpWuKt0/CB88LQ=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=4h4fL92X02InVBnz/kQhbEHzVjt3rOI2LVQx9EPoRXoyxNKiAnadh1NZ7vlDC24sJQzWs17JV7WO0CIpIbRO06O69lDTHvUBD4DcKSQxJFh5MpzUXbLUjZMimrfnh4jhIA4vl/z4YoLXHERnF3rW3cae1v4IE3lqq9zTIXgBprs= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=ymail.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=c2N2A/c09+qxk+v6LBviFSFZ7lNLH1jywLxlYxUfuWMB2pfLOb6UfdT7x5TDrBT+uiXSa5vvXJzr6GOByHByrS512G18QM85KGnzSkEkAdnlyNSvGwddtH6X0lh7tb4szBqk+oY06hvL2/7rdPN4+udIMuig+E5VKCU5mvaf8Dg=; X-YMail-OSG: 10ubCxMVM1nEF3pB91nTat3aIbOpMrNvHQ_qghyESsvCKK1 mZj28qOPiLyGP23aydc7ecs66JPbygsGCwiVbjw5BYmXxr2n_pBI- Received: from [76.255.18.237] by web162902.mail.bf1.yahoo.com via HTTP; Sun, 17 Nov 2013 07:34:10 PST X-Rocket-MIMEInfo: 002.001, Im1hcmtvQGpvaC50byIgPG1hcmtvQGpvaC50bz4gd3JvdGU6Cgo.wqDCoCAiaW5kZXhfdHJhbnNhY3Rpb25zX3RyYW5zYWN0aW9uX2JhbGFuY2VfZGV0YWlscyIgYnRyZWUKPiAodHJhbnNhY3Rpb25pZCkKPiBXSEVSRSBOT1QgcHJvY2Vzc2VkIEFORCBhY2NvdW50YmFsYW5jZXNkYWlseWlkIElTIE5PVCBOVUxMCj4KPiBIb3dldmVyLCBxdWVyeWluZyB3aXRoIHRoZSBXSEVSRSBjbGF1c2UgY29tcGxldGVseSBpZ25vcmVzIHRoZQo.IHBnX2NsYXNzLnJlbHR1cGxlcyB2YWx1ZSBmb3IgdGhlIGluZGV4OgoKV2gBMAEBAQE- X-Mailer: YahooMailWebService/0.8.163.597 References: Message-ID: <1384702450.20685.YahooMailNeo@web162902.mail.bf1.yahoo.com> Date: Sun, 17 Nov 2013 07:34:10 -0800 (PST) From: Kevin Grittner Reply-To: Kevin Grittner Subject: Re: BUG #8598: Row count estimates of partial indexes To: "marko@joh.to" , "pgsql-bugs@postgresql.org" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -0.1 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org "marko@joh.to" wrote: >=A0=A0 "index_transactions_transaction_balance_details" btree > (transactionid) > WHERE NOT processed AND accountbalancesdailyid IS NOT NULL > > However, querying with the WHERE clause completely ignores the > pg_class.reltuples value for the index: What is the pg_class.reltuples value for the index? > =3D# EXPLAIN ANALYZE SELECT * FROM transactions WHERE NOT processed > AND accountbalancesdailyid IS NOT NULL; > Index Scan using index_transactions_transaction_balance_details > on transactions=A0 (cost=3D0.00..3883160.47 rows=3D66259403 width=3D130) > (actual time=3D0.033..18.268 rows=3D13962 loops=3D1) > .. which makes for some silly joins when this index is part of a > larger query. > > Is this expected on 9.1?=A0 Has this been fixed in more recent > versions? Please provide a little more information: SELECT version(); SELECT name, current_setting(name), source =A0 FROM pg_settings =A0 WHERE source NOT IN ('default', 'override'); What VACUUM or ANALYZE commands are run outside of autovacuum? -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs