| From: | "Keith Worthington" <keithw(at)narrowpathinc(dot)com> |
|---|---|
| To: | "Joel Fradkin" <jfradkin(at)wazagua(dot)com> |
| Cc: | "PostgreSQL Perform" <pgsql-performance(at)postgresql(dot)org> |
| Subject: | Re: Any way to speed this up? |
| Date: | 2005-04-07 15:27:03 |
| Message-ID: | 20050407152150.M93433@narrowpathinc.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-performance |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | John Arbash Meinel | 2005-04-07 15:36:54 | Re: Any way to speed this up? |
| Previous Message | Mohan, Ross | 2005-04-07 15:21:32 | Building postmaster with Profiling Support WAS "Tweaking a C Function I wrote" |