Re: Any way to speed this up?
| От | Keith Worthington |
|---|---|
| Тема | Re: Any way to speed this up? |
| Дата | |
| Msg-id | 20050407152150.M93433@narrowpathinc.com обсуждение исходный текст |
| Ответ на | Any way to speed this up? ("Joel Fradkin" <jfradkin@wazagua.com>) |
| Список | 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
В списке pgsql-performance по дате отправления: