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

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Hannu Krosing <hannu(at)2ndquadrant(dot)com>, Peter Hussey <peter(at)labkey(dot)com>, pgsql-performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Questions on query planner, join types, and work_mem
Date: 2011-02-01 03:17:57
Message-ID: 201102010317.p113Hvc07473@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Robert Haas wrote:
> On Wed, Aug 11, 2010 at 9:42 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> > This confused me. ?If we are assuing the data is in
> > effective_cache_size, why are we adding sequential/random page cost to
> > the query cost routines?
>
> See the comments for index_pages_fetched(). We basically assume that
> all data starts uncached at the beginning of each query - in fact,
> each plan node. effective_cache_size only measures the chances that
> if we hit the same block again later in the execution of something
> like a nested-loop-with-inner-indexscan, it'll still be in cache.
>
> It's an extremely weak knob, and unless you have tables or indices
> that are larger than RAM, the only mistake you can make is setting it
> too low.

The attached patch documents that there is no assumption that data
remains in the disk cache between queries. I thought this information
might be helpful.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

Attachment Content-Type Size
/rtmp/effective.diff text/x-diff 1.0 KB

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Greg Smith 2011-02-01 11:53:49 Re: Configuration for a new server.
Previous Message Benjamin Krajmalnik 2011-01-31 23:55:32 Configuration for a new server.