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 79AA73A5E4C for ; Fri, 28 Jan 2005 18:38:22 +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 81714-04 for ; Fri, 28 Jan 2005 18:38:18 +0000 (GMT) Received: from mail.deg.cc (mail.deg.cc [64.139.134.201]) by svr1.postgresql.org (Postfix) with ESMTP id A449E3A5C0F for ; Fri, 28 Jan 2005 18:38:18 +0000 (GMT) Received: from deg.cc (kyle.deg.cc [198.70.16.205]) by mail.deg.cc (Postfix) with ESMTP id 139505610F; Fri, 28 Jan 2005 13:38:13 -0500 (EST) Message-ID: <41FA8697.1030200@deg.cc> Date: Fri, 28 Jan 2005 13:38:15 -0500 From: Pallav Kalva User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.2) Gecko/20040308 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tom Lane Cc: PERFORM Subject: Re: Poor Performance on Postgres 8.0 References: <41FA5726.7040502@deg.cc> <2581.1106929396@sss.pgh.pa.us> <41FA6F29.9060009@deg.cc> <8990.1106931750@sss.pgh.pa.us> In-Reply-To: <8990.1106931750@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200501/590 X-Sequence-Number: 10280 Hi Tom, I dropped the primary key constraint and ran the explain analyze on the same query and here is what i get seq scans on both the tables , still doesnt make use of the index on common.attribute table . QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------- Nested Loop (cost=0.00..5609.19 rows=1 width=104) (actual time=11.875..319.358 rows=1 loops=1) Join Filter: ("outer".fknamestringid = "inner".stringid) -> Seq Scan on attribute attribute0_ (cost=0.00..5604.76 rows=1 width=104) (actual time=11.541..318.649 rows=2 loops=1) Filter: (numericvalue = 775.0) -> Seq Scan on string text1_ (cost=0.00..4.41 rows=1 width=4) (actual time=0.277..0.319 rows=1 loops=2) Filter: (value = 'squareFeet'::text) Total runtime: 319.496 ms Tom Lane wrote: >Pallav Kalva writes: > > >>>begin; >>>alter table common.string drop constraint pk_string_stringid; >>>explain analyze ... same query ... >>>rollback; >>> >>> >>> >> what do u mean by rollback exactly ? i can drop the pk constraint >>and run explain analyze and see how it behaves. >> >> > >The point of the rollback is that you don't really make the pk >constraint go away. It is gone from the perspective of the EXPLAIN, >but after you rollback it's back again. Easier than rebuilding it... > > regards, tom lane > > >