pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Pallav Kalva <pkalva@deg.cc>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PERFORM <pgsql-performance@postgresql.org>
Subject: Re: Poor Performance on Postgres 8.0
Date: Fri, 28 Jan 2005 13:38:15 -0500
Message-ID: <41FA8697.1030200@deg.cc> (raw)
In-Reply-To: <8990.1106931750@sss.pgh.pa.us>
References: <41FA5726.7040502@deg.cc>
	<2581.1106929396@sss.pgh.pa.us>
	<41FA6F29.9060009@deg.cc>
	<8990.1106931750@sss.pgh.pa.us>

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 <pkalva@deg.cc> 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
>
>  
>





view thread (11+ messages)  latest in thread

Message-ID: <41FA8697.1030200@deg.cc>
Permalink:  ../41FA8697.1030200@deg.cc/
Also on:    postgresql.org/message-id/41FA8697.1030200@deg.cc

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: pkalva@deg.cc, tgl@sss.pgh.pa.us
  Subject: Re: Poor Performance on Postgres 8.0
  In-Reply-To: <41FA8697.1030200@deg.cc>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox