Re: Questions on query planner, join types, and work_mem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Hussey <peter(at)labkey(dot)com>
Cc: pgsql-performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Questions on query planner, join types, and work_mem
Date: 2010-08-03 02:55:45
Message-ID: 7124.1280804145@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Peter Hussey <peter(at)labkey(dot)com> writes:
> My questions are still
> 1) Does the planner have any component of cost calculations based on the
> size of work_mem,

Sure.

> and if so why do those calculations seem to have so
> little effect here?

Since you haven't provided sufficient information to let someone else
reproduce what you're seeing, it's pretty hard to say. It might have
something to do with the particularly wide join key values you're using,
but that's mere speculation based on the one tidbit you provided. There
might be some other effect altogether that's making it do the wrong thing.

> 2) Why is the setting of work_mem something left to the admin and/or
> developer?

Because we're not smart enough to find a way to avoid that.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Hannu Krosing 2010-08-03 07:03:51 Re: Questions on query planner, join types, and work_mem
Previous Message Robert Haas 2010-08-03 02:48:52 Re: Questions on query planner, join types, and work_mem