pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Keith Worthington <keithw@narrowpathinc.com>
To: Joel Fradkin <jfradkin@wazagua.com>
Cc: PostgreSQL Perform <pgsql-performance@postgresql.org>
Subject: Re: Any way to speed this up?
Date: Thu, 7 Apr 2005 11:27:03 -0400
Message-ID: <20050407152150.M93433@narrowpathinc.com> (raw)
In-Reply-To: <005301c53b84$6b83f8a0$797ba8c0@jfradkin>
References: <005301c53b84$6b83f8a0$797ba8c0@jfradkin>

On Thu, 07 Apr 2005 11:13:57 -0400, Joel Fradkin wrote
[snip]
> "  ->  Sort  (cost=393.76..394.61 rows=338 width=48) (actual
> time=62.000..62.000 rows=441 loops=1)"
> 
> "        Sort Key: l.locationid"
> 
> "        ->  Index Scan using ix_location on tbllocation l
> 
> (cost=0.00..379.56 rows=338 width=48) (actual time=15.000..62.000 rows=441
> loops=1)"
> 
> "              Index Cond: ('SAKS'::text = (clientnum)::text)"
> 
> "  ->  Sort  (cost=59478.03..59909.58 rows=172618 width=75) (actual
> time=46844.000..46985.000 rows=159960 loops=1)"
> 
> "        Sort Key: a.locationid"
[snip]
> 
> CREATE TABLE tblassociate
[snip]
> 
>   CONSTRAINT pk_tblassociate PRIMARY KEY (clientnum, associateid),
> 
>   CONSTRAINT ix_tblassociate UNIQUE (clientnum, associatenum)
> 
[snip]
> 
> Joel Fradkin

Joel,

I am REALLY new at this and struggling to understand EXPLAIN ANALYZE output
but for what it is worth it looks like the sort on a.locationid is taking up a
lot of the time.  I do not see an index on that column.  I would suggest
indexing tblassociate.locationid and seeing if that helps.

Kind Regards,
Keith



view thread (11+ messages)  latest in thread

Message-ID: <20050407152150.M93433@narrowpathinc.com>
Permalink:  ../20050407152150.M93433@narrowpathinc.com/
Also on:    postgresql.org/message-id/20050407152150.M93433@narrowpathinc.com

 · 

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: keithw@narrowpathinc.com, jfradkin@wazagua.com
  Subject: Re: Any way to speed this up?
  In-Reply-To: <20050407152150.M93433@narrowpathinc.com>

* 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