Re: Help with tuning this query (with explain analyze finally)

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Help with tuning this query (with explain analyze finally)
Дата
Msg-id 200503022152.13211.josh@agliodbs.com
обсуждение исходный текст
Ответ на Re: Help with tuning this query (with explain analyze finally)  ("Ken Egervari" <ken@upfactor.com>)
Список pgsql-performance
Ken,

>         ->  Merge Join  (cost=602.54..1882.73 rows=870 width=91) (actual
> time=234.000..312.000 rows=310 loops=1)
>               Merge Cond: ("outer".current_status_id = "inner".id)

Hmmm ... this merge join appears to be the majority of your execution
time .... at least within the resolution that PGWin allows us.    Please try
two things, and give us Explain Analyzes:

1) To determine your query order ala Dan Tow and drive off of person, please
SET JOIN_COLLAPSE_LIMIT = 1 and then run Mark Kirkwood's version of the
query.  (Not that I believe in Dan Tow ... see previous message ... but it
would be interesting to see the results.

2) Force PG to drop the merge join via SET ENABLE_MERGEJOIN = FALSE;

Also, please let us know some about the server you're using and your
configuration parameters, particularly:
shared_buffers
work_mem
effective_cache_size
random_page_cost

--
Josh Berkus
Aglio Database Solutions
San Francisco

В списке pgsql-performance по дате отправления:

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: Help with tuning this query
Следующее
От: "Ken Egervari"
Дата:
Сообщение: Re: Help with tuning this query (more musings)