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 13E583A6153 for ; Fri, 28 Jan 2005 20:50:54 +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 02208-06 for ; Fri, 28 Jan 2005 20:50:44 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id AF8603A60D7 for ; Fri, 28 Jan 2005 20:50:44 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j0SKog2d025931; Fri, 28 Jan 2005 15:50:43 -0500 (EST) To: Pallav Kalva Cc: PERFORM Subject: Re: Poor Performance on Postgres 8.0 In-reply-to: <41FA992B.2090405@deg.cc> References: <41FA5726.7040502@deg.cc> <2581.1106929396@sss.pgh.pa.us> <41FA6F29.9060009@deg.cc> <8990.1106931750@sss.pgh.pa.us> <41FA8697.1030200@deg.cc> <22896.1106941715@sss.pgh.pa.us> <41FA992B.2090405@deg.cc> Comments: In-reply-to Pallav Kalva message dated "Fri, 28 Jan 2005 14:57:31 -0500" Date: Fri, 28 Jan 2005 15:50:42 -0500 Message-ID: <25930.1106945442@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/598 X-Sequence-Number: 10288 I was able to duplicate this behavior with dummy data that had only a few distinct values for fknamestringid --- the planner then thinks that the index probe into attribute will match a lot of rows and hence take a long time. Could we see your pg_stats row for fknamestringid, ie select * from pg_stats where tablename = 'attribute' and attname = 'fknamestringid'; It would be interesting to see the same for your 7.4 installation too. regards, tom lane