Re: Poor performance o

Поиск
Список
Период
Сортировка
От Craig A. James
Тема Re: Poor performance o
Дата
Msg-id 4420A290.2050908@modgraph-usa.com
обсуждение исходный текст
Ответ на Re: Poor performance o  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Poor performance o
Re: Poor performance o
Список pgsql-performance
Tom Lane wrote:
> "Craig A. James" <cjames@modgraph-usa.com> writes:
>> It looks to me like the problem is the use of nested loops when a hash
>> join should be used, but I'm no expert at query planning.
>
> Given the sizes of the tables involved, you'd likely have to boost up
> work_mem before the planner would consider a hash join.  What nondefault
> configuration settings do you have, anyway?

shared_buffers = 20000
work_mem = 32768
effective_cache_size = 300000

This is on a 4GB machine.  Is there a guideline for work_mem that's related to table size?  Something like, "allow 2 MB
permillion rows"? 

I'm also curious why the big difference between my "Query #1" and "Query #2".  Even though it does a nested loop, #2's
outerloop only returns one result from a very tiny table, so shouldn't it be virtually indistinguishable from #1? 

Thanks,
Craig

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Poor performance o
Следующее
От: Vivek Khera
Дата:
Сообщение: Re: Best OS & Configuration for Dual Xeon w/4GB &